backtrack: rename generically named require

db4
Doug Coleman 2015-06-08 17:19:32 -07:00
parent 8cb176bfe7
commit a2de784312
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ M: amb-failure summary drop "Backtracking failure" ;
: fail ( -- )
failure get [ continue ] [ amb-failure ] if* ;
: require ( ? -- )
: must-be-true ( ? -- )
[ fail ] unless ;
MACRO: checkpoint ( quot -- quot' )
@ -66,7 +66,7 @@ MACRO: amb-execute ( seq -- quot )
: if-amb ( true false -- ? )
[
[ { t f } amb ]
[ '[ @ require t ] ]
[ '[ @ must-be-true t ] ]
[ '[ @ f ] ]
tri* if
] amb-preserve ; inline