RosettaCodeData/Task/Power-set/Qi/power-set.qi
2023-07-01 13:44:08 -04:00

4 lines
115 B
Text

(define powerset
[] -> [[]]
[A|As] -> (append (map (cons A) (powerset As))
(powerset As)))