4 ms·
I thought I remembered the 'amb' operator sounded similar. It is discussed in "Teach Yourself Scheme in Fixnum Days." From chap 14 ( http://gd.tuwien.ac.at/lang
by twopoint718 18y ago
I thought I remembered the 'amb' operator sounded similar. It is discussed in "Teach Yourself Scheme in Fixnum Days." From chap 14 ( http://gd.tuwien.ac.at/languages/scheme/tutorial-dsitaram/t-y-scheme-Z-H-15.html http://gd.tuwien.ac.at/languages/scheme/tutorial-dsitaram/t-... )
`amb` takes zero or more expressions, and makes a
nondeterministic (or ``ambiguous'') choice among them,
preferring those choices that cause the program to
converge meaningfully. Here we will explore an embedding
of amb in Scheme that makes a depth-first selection of
the ambiguous choices, and uses Scheme's control operator
call/cc to backtrack for alternate choices.
- visitor4rmindia 18y agoAmb is implemented using continuations and so the problem of side-effects remains. If we don't consider side-effects then "tabs" just degenerates into "continuations". EDIT: Maybe tabs == "monads" + "continuations"? I don't know enough about haskell to tell.