RosettaCodeData/Task/Logical-operations/Retro/logical-operations.retro

7 lines
219 B
Plaintext

: .bool ( f- ) [ "true" ] [ "false" ] if puts cr ;
: logic ( ab- )
"\na = " puts over .bool "b = " puts dup .bool
"\na and b = " puts 2dup and .bool
"\na or b = " puts over or .bool
"\nnot a = " puts not .bool ;