mirror of
https://github.com/kanaka/mal.git
synced 2024-11-13 01:43:50 +03:00
Merge pull request #312 from jonaslu/add_metadata_reader_macro_in_docs
Update guide with note on reader macro with-meta
This commit is contained in:
commit
c0f10162f3
@ -1527,6 +1527,11 @@ diff -urp ../process/step9_try.txt ../process/stepA_mal.txt
|
|||||||
returned that has its `meta` attribute set to the second argument.
|
returned that has its `meta` attribute set to the second argument.
|
||||||
Note that it is important that the environment and macro attribute
|
Note that it is important that the environment and macro attribute
|
||||||
of mal function are retained when it is copied.
|
of mal function are retained when it is copied.
|
||||||
|
* Add a reader-macro that expands the token "^" to
|
||||||
|
return a new list that contains the symbol "with-meta" and the
|
||||||
|
result of reading the next next form (2nd argument) (`read_form`) and the
|
||||||
|
next form (1st argument) in that order
|
||||||
|
(metadata comes first with the ^ macro and the function second).
|
||||||
|
|
||||||
* Add a new "\*host-language\*" (symbol) entry to your REPL
|
* Add a new "\*host-language\*" (symbol) entry to your REPL
|
||||||
environment. The value of this entry should be a mal string
|
environment. The value of this entry should be a mal string
|
||||||
|
Loading…
Reference in New Issue
Block a user