RosettaCodeData/Task/Combinations/Quackery/combinations-1.quackery

22 lines
410 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
[ over 0 = iff
2025-02-27 18:35:13 -05:00
[ 2drop ' [ [ ] ] ]
done
dup [] = iff nip done
1 split rot tuck
1 - over recurse
dip [ rot [] ]
witheach
[ dip over join
nested join ]
nip unrot recurse join ] is comb ( n [ --> [ )
2023-07-01 11:58:00 -04:00
2025-02-27 18:35:13 -05:00
[ [] swap times
[ i^ join ]
comb
witheach
[ witheach
[ echo sp ]
cr ] ] is task ( n n --> )
2023-07-01 11:58:00 -04:00
2025-02-27 18:35:13 -05:00
3 5 task