Re: drop-while and (pred item) returns nil?
By the way, I cloned the Clojure repo and have adjusted the docs for this function, but I can't figure out how to get Github to submit it for approval, or for a pull request or whatever it is. If someone wants to take this patch and check it in for me, that would be fine too. diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj index eaab3aa..ef05ccb 100644 --- a/src/clj/clojure/core.clj +++ b/src/clj/clojure/core.clj @@ -2451,7 +2451,7 @@ (defn drop-while Returns a lazy sequence of the items in coll starting from the first - item for which (pred item) returns nil. + item for which (pred item) returns logical false. {:added 1.0 :static true} [pred coll] On Sep 9, 11:46 pm, Jacek Laskowski ja...@laskowski.net.pl wrote: On Fri, Sep 10, 2010 at 1:08 AM, Alan a...@malloys.org wrote: I'm not 100% sure what you're asking, but I think I understand you, and in that case you can refer to http://groups.google.com/group/clojure/browse_thread/thread/9c7f72670..., in which I ask this very question and get the answers I am looking for. Hi Alan, That was my point exactly - the reference to nil in the docstring for drop-while. It's a bit confusing to me and I'd expect a boolean reference instead. Jacek -- Jacek Laskowski Notatnik Projektanta Java EE -http://jaceklaskowski.pl -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: drop-while and (pred item) returns nil?
Hi, On 13 Sep., 08:22, Alan a...@malloys.org wrote: By the way, I cloned the Clojure repo and have adjusted the docs for this function, but I can't figure out how to get Github to submit it for approval, or for a pull request or whatever it is. If someone wants to take this patch and check it in for me, that would be fine too. The usual approach is detailed here: http://clojure.org/patches. Sincerely Meikel -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: drop-while and (pred item) returns nil?
On Fri, Sep 10, 2010 at 1:08 AM, Alan a...@malloys.org wrote: I'm not 100% sure what you're asking, but I think I understand you, and in that case you can refer to http://groups.google.com/group/clojure/browse_thread/thread/9c7f726709e24c12/b2e2696b70d924f2?show_docid=b2e2696b70d924f2, in which I ask this very question and get the answers I am looking for. Hi Alan, That was my point exactly - the reference to nil in the docstring for drop-while. It's a bit confusing to me and I'd expect a boolean reference instead. Jacek -- Jacek Laskowski Notatnik Projektanta Java EE - http://jaceklaskowski.pl -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
drop-while and (pred item) returns nil?
Hi, According to drop-while doc, (pred item) will return nil. It struck me as I thought the form would only return a boolean. Is the doc correct? What would be an example? user= (doc drop-while) - clojure.core/drop-while ([pred coll]) Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns nil. Jacek -- Jacek Laskowski Notatnik Projektanta Java EE - http://jaceklaskowski.pl -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: drop-while and (pred item) returns nil?
Boolean seems to work: user= (drop-while #( % 4) (range 10)) (4 5 6 7 8 9) user= On Sep 9, 2:51 pm, Jacek Laskowski ja...@laskowski.net.pl wrote: Hi, According to drop-while doc, (pred item) will return nil. It struck me as I thought the form would only return a boolean. Is the doc correct? What would be an example? user= (doc drop-while) - clojure.core/drop-while ([pred coll]) Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns nil. Jacek -- Jacek Laskowski Notatnik Projektanta Java EE -http://jaceklaskowski.pl -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: drop-while and (pred item) returns nil?
I'm not 100% sure what you're asking, but I think I understand you, and in that case you can refer to http://groups.google.com/group/clojure/browse_thread/thread/9c7f726709e24c12/b2e2696b70d924f2?show_docid=b2e2696b70d924f2, in which I ask this very question and get the answers I am looking for. On Sep 9, 3:50 pm, Miki miki.teb...@gmail.com wrote: Boolean seems to work: user= (drop-while #( % 4) (range 10)) (4 5 6 7 8 9) user= On Sep 9, 2:51 pm, Jacek Laskowski ja...@laskowski.net.pl wrote: Hi, According to drop-while doc, (pred item) will return nil. It struck me as I thought the form would only return a boolean. Is the doc correct? What would be an example? user= (doc drop-while) - clojure.core/drop-while ([pred coll]) Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns nil. Jacek -- Jacek Laskowski Notatnik Projektanta Java EE -http://jaceklaskowski.pl -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en