multi-list-combination   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

;; combine multiple ordered lists into combinations
;;
;; for example (multi-list-combination '(a b) '(c d)) -> ((a c) (a d) (b c) (b d))
;; or (multi-list-combination '(a b) '(c) '(d e)) -> ((a c d) (a c e) (b c d) (b c e))
;;
(define multi-list-combination
  (lambda args
    (map (lambda (k) (flatten k)) (apply multi-list-combination-2 args))))


Back to Index

Similar Entries