\r
IN: adsoda.combinators\r
\r
-! : (combinations) ( seq -- seq ) [ 1 tail ] dip combinations ; \r
+! : (combinations) ( seq -- seq ) [ 1 tail ] dip combinations ;\r
\r
! : prefix-each [ prefix ] curry map ; inline\r
\r
! { [ dup 0 = ] [ 2drop { { } } ] }\r
! { [ over empty? ] [ 2drop { } ] }\r
! { [ t ] [ \r
-! [ [ 1- (combinations) ] [ drop first ] 2bi prefix-each ]\r
+! [ [ 1 - (combinations) ] [ drop first ] 2bi prefix-each ]\r
! [ (combinations) ] 2bi append\r
! ] }\r
! } cond ;\r
{ [ over 1 = ] [ 3drop columnize ] }\r
{ [ over 0 = ] [ 2drop 2drop { } ] }\r
{ [ 2dup < ] [ 2drop [ 1 cut ] dip \r
- [ 1- among [ append ] with map ] \r
+ [ 1 - among [ append ] with map ] \r
[ among append ] 2bi\r
] }\r
{ [ 2dup = ] [ 3drop 1array ] }\r
} cond\r
;\r
\r
-: concat-nth ( seq1 seq2 -- seq ) [ nth append ] curry map-index ;\r
+: concat-nth ( seq1 seq2 -- seq ) \r
+ [ nth append ] curry map-index ;\r
\r
: do-cycle ( array -- array ) dup first suffix ;\r
\r