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
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
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