Re: seq-utils testing reveals potential flatten bugs

2009-08-08 Thread Sean Devlin
My thought we to use the test cases as a specification for the desired behavior. 1. Assume that the following case is desired behavior [:a 1 2 :b 3] [[:a [1 2]] [:b 3]] My thought was that "If it's a seq, flatten it". That lead me to develop the test case above. Here's how it works explicit

Re: seq-utils testing reveals potential flatten bugs

2009-08-08 Thread Meikel Brandmeyer
Hi, Am 08.08.2009 um 07:36 schrieb Sean Devlin: In my opinion, flatten to behave more like this: http://gist.github.com/164291 May I ask a stupid question? What is the use of this case: [:a 1 2 :b 3] {:a [1 2] :b 3} Wouldn't it be more useful to flatten only depending on the outer

seq-utils testing reveals potential flatten bugs

2009-08-07 Thread Sean Devlin
See Assembla ticket 13 in for clojure contrib to view the diff containing the test cases I just finished writing tests for the following functions in seq- utils: flatten separate includes? indexed group-by partition-by frequencies reductions rotations partition-all shuffle (invariants) rand-elt