Usage: (take n coll)
Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n.
"Returns a lazy sequence of the first n items in coll, or all items ifthere are fewer than n."{:added "1.0":static true:examples ['(take 5 (range 10)),'(take 3 (drop 5 (range 1 11)))]}[n coll](lazy-seq(when (pos? n)(when-let [s (seq coll)](cons (first s) (take (dec n) (rest s)))))))
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@googlegroups.com
Note that posts from new members are moderated - please be patient with your first post.
To unsubscribe from this group, send email to
clojure+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
I talked very briefly about this at Clojure/West with Lee Hinman
(author of clojuredocs-client) and Zack Kim (of clojuredocs fame), and
it sounded like they're open to this idea and even have ideas about
how it might work. I'm not sure whether it's big or interesting enough
for a GSOC project, or even which projects would be involved, but it's
certainly something I'd like to have.
> "Clojure Dev" group.
> To post to this group, send email to cloju...@googlegroups.com.
> To unsubscribe from this group, send email to
> clojure-dev...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/clojure-dev?hl=en.
--
Colin Jones
@trptcolin
On a related not, just because examples won't be added to the core, that
doesn't mean it can't be added externally. You can always do something
like:
(alter-meta! #'clojure.core/+ assoc :examples […])
This way all of the example code could be kept outside of the core but
still associated with the core functions.
Sincerely,
Daniel
https://github.com/jafingerhut/cd-client
Andy