3 ms·
isn't this basic Prolog? ?- member(X,[1,2,3]),member(Y,[4,5,6]),X*Y#=8.
by sterlind 3y ago
isn't this basic Prolog?
?- member(X,[1,2,3]),member(Y,[4,5,6]),X*Y#=8.
- dragonwriter 3y agoYes, but: FTFA: “Back in 1961, John McCarthy (the inventor of LISP) described an interesting mathematical operator called amb.” Prolog: “First appeared 1972” [0] [0] https://en.wikipedia.org/wiki/Prolog https://en.wikipedia.org/wiki/Prolog
- throwanem 3y agoNo. The example describes it in terms of satisfying a predicate, but only by chance; this article actually demonstrates continuations, a language feature more commonly seen in Scheme and much more clearly described at https://courses.cs.washington.edu/courses/cse341/04wi/lectures/15-scheme-continuations.html https://courses.cs.washington.edu/courses/cse341/04wi/lectur...