On Mon, Jan 26, 2009 at 6:24 AM, e evier...@gmail.com wrote:
ok, I'll check that stuff out. Thanks.
It occurs to me this is being compared to something in ruby called
partition. I like that name. partition-by ... but maybe it was opted to
use the simpler name, which I can appreciate.
The IRC channel folks helped me implement what we discovered was
already called separate in contribs. My point was to do a partition
that generated the two lists (passes pred) and (fails pred) in one
pass without recursion.
We ended up with:
(defn filt-rem [pred coll]
(loop [l1 () l2 () [f
Hi e,
I'm still learning the basics, very much like you( I guess you are ahead of
me in Clojure). However, I have a question for you and not an answer to your
questions. Why do you have doall here (def l1 (doall (take 5 (repeatedly
#(rand-int 3000) . From my little knowledge of Clojure,
people are paying a lot of attention to pure functional languages, which I
think mean ones that don't ever destroy data structures out from under
people pointing at them. Instead, people who need different views just get
their own different views -- possibly reusing common components.
This other
oh, so anyway, i put it in that specific place because I wasn't sure if,
without it, l1 would just be some sort of smart, lazy list that only exists
when you start trying to get the values. I didn't think so, but, again, I'm
just trying to shotgun the problem.
On Sun, Jan 25, 2009 at 1:57 PM, e
On Jan 25, 2009, at 5:24 PM, e wrote:
Do folks in the contrib group like this new implementation?
To make contributions to clojure-contrib, you'll need to have a
Contributor Agreement on file with Rich. Please see http://clojure.org/contributing
.
I think your implementation is an
ok, I'll check that stuff out. Thanks.
It occurs to me this is being compared to something in ruby called
partition. I like that name. partition-by ... but maybe it was opted to
use the simpler name, which I can appreciate.
On that subject, I know filter is standard from other languages like