Monday, May 27, 2013

Conj for list and vector

conj = conjoin

(conj [1 2 3] 4)  --> [1 2 3 4]
note: Vector letak new item di belakang

for list:

(conj '(1 2 3) 4 ) ---> '(4 1 2 3)
note: List letak new item di depan

For reference:
[ ]  array/vector
'( ) list
#{ } set
{ } map
#" " regular expression


No comments:

Post a Comment