factor/library/test/combinators.factor

19 lines
349 B
Factor
Raw Normal View History

2004-07-16 02:26:21 -04:00
IN: scratchpad
USE: arithmetic
USE: combinators
USE: kernel
USE: lists
USE: stack
USE: stdio
USE: test
USE: words
! Tests the combinators.
"Checking combinators." print
[ ] [ 3 ] [ [ ] cond ] test-word
[ t ] [ 4 ] [ [ [ 1 = ] [ ] [ 4 = ] [ drop t ] [ 2 = ] [ ] ] cond ] test-word
[ [ 1 2 3 ] ] [ [ 1 4 2 5 3 6 ] [ 4 < ] ] [ subset ] test-word