Hi -
The intricacy of the code in backtracking.factor is pretty amazing; a good
example
of making use of the continuations vocab, for sure. The two examples on the
re-factor.blogspot:
$7.11 <https://re-factor.blogspot.com/2017/02/711.html>  and SEND + MORE =
MONEY?
<https://github.com/mrjbq7/re-factor/blob/master/send-more-money/send-more-money.factor>
are a great help in figuring out how non-determinism via John McCarthy's
amb
(ambiguous) operator works in backtracking. Thanks for these!

Note that the github code def for `digit` in send-more-money.factor is
missing a word:

: digit ( seq -- n )
    digits swap amb-lazy ;

should read

: digit ( seq -- n )
    digits swap *diff* amb-lazy ;

and then all is well.
Cheers,
~cw

-- 
*~ Memento Amori*
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to