Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (use srfi-1)
- (define (list-combinator nlist)
- (define (comb alist blist)
- ((compose concatenate map) (lambda (a) (map (cut cons a <>) blist)) alist))
- (fold-right comb '(()) nlist))
- (print (list-combinator '((1 2 3) (4 5 6) (7 8 9))))
Add Comment
Please, Sign In to add comment