John Holland <[email protected]> writes:

> Is there a better way to do this?

See `take-last'¹ and, specifically for vectors where you can calculate
the start index of the suffix, `subvec'².

Note that even though Clojure has a `last' function with the same name
as Common Lisp's `last'³, the former lacks the optional count argument
accepted by the latter.


Footnotes: 
¹ http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/take-last
² http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/subvec
³ http://www.lispworks.com/documentation/HyperSpec/Body/f_last.htm

-- 
Steven E. Harris

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to