Skip to content

Instantly share code, notes, and snippets.

@fffej
Created August 5, 2009 20:09
Show Gist options
  • Save fffej/162916 to your computer and use it in GitHub Desktop.
Save fffej/162916 to your computer and use it in GitHub Desktop.
(mac accum (accfn . body)
(w/uniq gacc
`(withs (,gacc nil ,accfn [push _ ,gacc])
,@body
(rev ,gacc))))
(def keys (h)
(accum a (each (k v) h (a k))))
(def vals (h)
(accum a (each (k v) h (a v))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment