Re: Any reason interleave needs 2 or more collections?

2011-11-03 Thread Ben Smith-Mannschott
On Thu, Nov 3, 2011 at 03:14, Alex Baranosky alexander.barano...@gmail.com wrote: What a coincidence. My instinct would be to make (interleave) return an empty seq, instead of nil. I wonder the trade-offs between the two? There is no such thing as an empty seq. Or put another way, the empty seq

Re: Any reason interleave needs 2 or more collections?

2011-11-03 Thread Meikel Brandmeyer
Hi, Am 03.11.2011 um 12:18 schrieb Ben Smith-Mannschott: There is no such thing as an empty seq. Or put another way, the empty seq *is* nil. You're probably thinking of an empty list. while this is true, the following is dangerous Returning nil has the advantage that nil is false in a

Re: Any reason interleave needs 2 or more collections?

2011-11-03 Thread Ben Smith-Mannschott
On Thu, Nov 3, 2011 at 13:13, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 03.11.2011 um 12:18 schrieb Ben Smith-Mannschott: There is no such thing as an empty seq. Or put another way, the empty seq *is* nil. You're probably thinking of an empty list. while this is true, the following is

Re: Any reason interleave needs 2 or more collections?

2011-11-03 Thread Alan Malloy
On Nov 3, 4:18 am, Ben Smith-Mannschott bsmith.o...@gmail.com wrote: On Thu, Nov 3, 2011 at 03:14, Alex Baranosky alexander.barano...@gmail.com wrote: What a coincidence. My instinct would be to make (interleave) return an empty seq, instead of nil. I wonder the trade-offs between the two?

Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alex Baranosky
Something interesting I've noticed: I've recently realized I could simplify some application code of mine by using interleave. I immediately noticed that in the spot I was using it I would never be sure to have 2+ streams (from

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Sean Corfield
I seem to recall seeing a ticket opened in JIRA for this recently with a patch so maybe it'll get incorporated. On Wed, Nov 2, 2011 at 6:28 PM, Alex Baranosky alexander.barano...@gmail.com wrote: Something interesting I've noticed: I've recently realized I could simplify some application code

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alan Malloy
http://groups.google.com/group/clojure-dev/browse_thread/thread/b81c6c8621629960/b73ed6ba28b60781 http://www.google.com/url?sa=Dq=http://dev.clojure.org/jira/browse/CLJ-863usg=AFQjCNGcl4S8hvppsmfP8mtjo1W2y5wgfA On Nov 2, 6:28 pm, Alex Baranosky alexander.barano...@gmail.com wrote: Something

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alan Malloy
That's what I get for copy/pasting a link from Google Groups. The real URL for the JIRA ticket is http://dev.clojure.org/jira/browse/CLJ-863 if you'd rather avoid the pointless redirect. On Nov 2, 7:02 pm, Alan Malloy a...@malloys.org wrote:

Re: Any reason interleave needs 2 or more collections?

2011-11-02 Thread Alex Baranosky
What a coincidence. My instinct would be to make (interleave) return an empty seq, instead of nil. I wonder the trade-offs between the two? On Wed, Nov 2, 2011 at 10:02 PM, Alan Malloy a...@malloys.org wrote: