RosettaCodeData/Task/Combinations/Egison/combinations.egison

7 lines
154 B
Text
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
(define $comb
(lambda [$n $xs]
(match-all xs (list integer)
[(loop $i [1 ,n] <join _ <cons $a_i ...>> _) a])))
(test (comb 3 (between 0 4)))