Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defmacro nth->
- "Fast lookup into nested vectors. Indices must be ints"
- [coll [id & idx]]
- (let [coll (with-meta coll {:tag Indexed})]
- (if (seq idx)
- `(nth-> (.nth ~coll ~id) ~idx)
- `(.nth ~coll ~id))))
Add Comment
Please, Sign In to add comment