24-game: add division operation.
parent
2dfa80c71e
commit
781c60cfe7
|
@ -8,8 +8,10 @@ IN: 24-game
|
||||||
|
|
||||||
: nop ( -- ) ;
|
: nop ( -- ) ;
|
||||||
|
|
||||||
|
: ?/ ( a b -- c ) [ drop 1/0. ] [ / ] if-zero ;
|
||||||
|
|
||||||
: do-operation ( a b -- c )
|
: do-operation ( a b -- c )
|
||||||
{ + - * } amb-execute ;
|
{ + - * ?/ } amb-execute ;
|
||||||
|
|
||||||
: permute-2 ( a b -- a b )
|
: permute-2 ( a b -- a b )
|
||||||
{ nop swap } amb-execute ;
|
{ nop swap } amb-execute ;
|
||||||
|
|
Loading…
Reference in New Issue