1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-22 02:58:15 +03:00

Merge pull request #204 from dubek/guide-step2-addition

process/guide: add vector and hash-map evaluation in step 2
This commit is contained in:
Joel Martin 2016-04-27 20:04:22 -05:00
commit afc5a78f98

View File

@ -543,6 +543,16 @@ make "test^quux^step2"
You now have a simple prefix notation calculator!
#### Deferrable:
* `eval_ast` should evaluate elements of vectors and hash-maps. Add the
following cases in `eval_ast`:
* If `ast` is a vector: return a new vector that is the result of calling
`EVAL` on each of the members of the vector.
* If `ast` is a hash-map: return a new hash-map which consists of key-value
pairs where the key is a key from the hash-map and the value is the result
of calling `EVAL` on the corresponding value.
<a name="step3"></a>