fix my macro example cause I'm dumb
This commit is contained in:
parent
7248a929bf
commit
f5cd038493
15
README.md
15
README.md
@ -129,12 +129,15 @@ variable names in the body (utterly useless):
|
|||||||
# capitalize looks for the first letter in a string and capitalizes it
|
# capitalize looks for the first letter in a string and capitalizes it
|
||||||
#
|
#
|
||||||
(. defn caplet [mapping body...]
|
(. defn caplet [mapping body...]
|
||||||
(. eval (: elem-map
|
(. eval
|
||||||
(. fn [x]
|
(. let
|
||||||
(. if (: mapping (: slice x 1))
|
(: elem-map
|
||||||
(: capitalize x)
|
(. fn [x]
|
||||||
x))
|
(. if (: mapping (: slice x 1))
|
||||||
body))
|
(: capitalize x)
|
||||||
|
x))
|
||||||
|
mapping)
|
||||||
|
body...)))
|
||||||
|
|
||||||
#Usage
|
#Usage
|
||||||
(. caplet [foo "this is foo"
|
(. caplet [foo "this is foo"
|
||||||
|
Loading…
Reference in New Issue
Block a user