Arc Forum
new
|
comments
|
leaders
|
submit
login
does maptable map?
4 points
by
eugen
6318 days ago |
1 comment
Since maptable doesn't return a new table, I'm wondering why is it called like that. Does it qualify as a map function? Shouldn't it be called eachpair or something?
1 point
by
icemaze
6318 days ago |
link
While CL's maphash returns nil, Arc's maptable al least returns the hash. A better approach IMHO. If you need a different hash you can do:
(maphash (fn (k v) ....) (copy-table tbl))
Implementing
copy-table
is left as an exercise for the reader. :P
-----