]> gitweb.factorcode.org Git - factor.git/blob - extra/combinators/conditional/conditional.factor
Updating code for make and fry changes
[factor.git] / extra / combinators / conditional / conditional.factor
1
2 USING: kernel combinators sequences macros fry newfx combinators.cleave ;
3
4 IN: combinators.conditional
5
6 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
8 MACRO: 1if ( test then else -- ) '[ dup @ _ _ if ] ;
9
10 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
12 MACRO: 1cond ( tbl -- )
13   [ [ 1st [ dup ] prepend ] [ 2nd ] bi {2} ] map
14   [ cond ] prefix-on ;
15
16 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
17