Created
June 5, 2013 15:20
-
-
Save moratori/5714679 to your computer and use it in GitHub Desktop.
list comprehenison test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(print [x | x <- '(1 2 3)]) | |
(print [(cons x y) | x <- '(1 2 3) y <- '(2 3) ]) | |
(print [(funcall f x) | f <- '(sin cos tan) x <- '(1 2 3 4 5) (evenp x)]) | |
(print [(* x y) | (x y) <- '((1 2) (3 4) (5 6))]) | |
(ql:quickload :alexandria) | |
(use-package :alexandria) | |
(print [`(,x ,y ,z)| x <- (iota 10) y <- (iota 10) z <- (iota 10) (= (+ (* 5 x) (* 3 y) (* -6 z)) 13)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment