Skip to content

Commit 29c060a

Browse files
authored
Merge pull request #78 from jlapeyre/assoc!doc
document assoc!
2 parents 45e5bfe + 512ec42 commit 29c060a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/utils.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
export @esc, isexpr, isline, rmlines, unblock, block, inexpr, namify, isdef,
22
longdef, shortdef, @expand, makeif, prettify, splitdef, splitarg
33

4+
"""
5+
assoc!(d, k, v)
6+
7+
is the same as `d[k] = v` but returns `d` rather than `v`.
8+
"""
49
assoc!(d, k, v) = (d[k] = v; d)
510

611
"""

0 commit comments

Comments
 (0)