Update answer key and add vector function.
This commit is contained in:
parent
4155a6b8ea
commit
c0cc0e32fb
@ -1,13 +1,16 @@
|
|||||||
(meditations
|
(meditations
|
||||||
"You can use vectors in clojure to create an 'Array' like structure"
|
"You can use vectors in clojure to create an 'Array' like structure"
|
||||||
(= __ (.size (vec nil)))
|
(= __ (.size []))
|
||||||
|
|
||||||
"You can create a vector in two ways"
|
"You can create a vector in several ways"
|
||||||
(= __ (vec nil))
|
(= __ (vec nil))
|
||||||
|
|
||||||
"And populate it in either of these ways"
|
"And populate it in either of these ways"
|
||||||
(= __ (vec '(1)))
|
(= __ (vec '(1)))
|
||||||
|
|
||||||
|
"There is another way as well"
|
||||||
|
(= __ (vector nil))
|
||||||
|
|
||||||
"But you can populate it with any number of elements at once"
|
"But you can populate it with any number of elements at once"
|
||||||
(= [1 __] (vec '(1 2)))
|
(= [1 __] (vec '(1 2)))
|
||||||
|
|
||||||
|
@ -19,8 +19,12 @@
|
|||||||
"\"No dice!\""
|
"\"No dice!\""
|
||||||
"()"]}
|
"()"]}
|
||||||
"vectors" {"__" [0
|
"vectors" {"__" [0
|
||||||
|
[]
|
||||||
|
[1]
|
||||||
|
[nil]
|
||||||
2
|
2
|
||||||
[333]
|
[333]
|
||||||
|
:peanut
|
||||||
:jelly
|
:jelly
|
||||||
:jelly
|
:jelly
|
||||||
[:butter :and]]}
|
[:butter :and]]}
|
||||||
@ -35,6 +39,7 @@
|
|||||||
1
|
1
|
||||||
1
|
1
|
||||||
"\"Vancouver\""
|
"\"Vancouver\""
|
||||||
|
nil
|
||||||
true
|
true
|
||||||
false
|
false
|
||||||
"\"February\""
|
"\"February\""
|
||||||
|
Loading…
Reference in New Issue
Block a user