Created
May 3, 2013 15:49
-
-
Save noahlz/5510191 to your computer and use it in GitHub Desktop.
concat vs. conj vs. cons vs. list vs. list*
This file contains hidden or 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
user=> (concat '(1 2 3) '(4 5 6)) | |
(1 2 3 4 5 6) | |
user=> (conj '(1 2 3) '(4 5 6)) | |
((4 5 6) 1 2 3) | |
user=> (cons '(1 2 3) '(4 5 6)) | |
((1 2 3) 4 5 6) | |
user=> (list '(1 2 3) '(4 5 6)) | |
((1 2 3) (4 5 6)) | |
user=> (list* '(1 2 3) '(4 5 6)) | |
((1 2 3) 4 5 6) | |
user=> (concat [1 2 3] [4 5 6]) | |
(1 2 3 4 5 6) | |
user=> (conj [1 2 3] [4 5 6]) | |
[1 2 3 [4 5 6]] | |
user=> (cons [1 2 3] [4 5 6]) | |
([1 2 3] 4 5 6) | |
user=> (list [1 2 3] [4 5 6]) | |
([1 2 3] [4 5 6]) | |
user=> (list* [1 2 3] [4 5 6]) | |
([1 2 3] 4 5 6) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment