Re: Looking for an equivalent of reductions for reduce for ->

2015-03-02 Thread Bill Allen
es [f g]) 5) > ;=> ([6] [12]) > > ((intermediates [f g h]) 5) > ;=> ([6 12 17]) > > ((intermediates [f g h]) 5 7 9) ; each vector is [(f x) (g (f x)) (h > (g (f x)))] > ;=> ([6 12 17] [8 16 21] [10 20 25]) > > cheers, > -tom > > > On Sund

Looking for an equivalent of reductions for reduce for ->

2015-03-01 Thread Bill Allen
Hopefully that makes sense. Let me illustrate. (reduce + [1 2 3 4]) ;=> 10 (reductions + [1 2 3 4) ;=> (1 3 6 10) (-> 1 f g h) ;=> (h (g (f 1))) I'm hoping to get a function that behaves like: (--> 1 f g h) ;=> ((f 1) (g (f 1) (h (g (f 1 Any ideas? Regards, Bill -- You received this mess

Re: s-expression levels and higher order functions

2012-07-20 Thread Bill Allen
Looks like a good addition for 4clojure. On Jul 19, 2012 8:36 PM, "Alan Malloy" wrote: > No, but it's pretty easy to write: > > (defn map-depth [f coll depth] > (if (zero? depth) > (map f coll) > (for [x coll] > (map-depth f x (dec depth) > > On Tuesday, July 17, 2012 7:17:19

Re: how to get good at clojure?

2012-05-14 Thread Bill Allen
Sam, thanks for the pointer to quilt. Looks really cool. I'm starting to imagine a project with quilt and overtone together! Regards, Bill On May 11, 2012 3:34 PM, "Sam Aaron" wrote: > In addition to following up on all the great suggestions above, I'd hack > about with Quil; it's a lot of fun an

Re: how to get good at clojure?

2012-05-09 Thread Bill Allen
This is the ticket. You can read all the books you want (and they do help), but working through 4clojure (and observing the solutions by others) will teach you more and better than anything else you can do. On Tue, May 8, 2012 at 4:08 PM, Bill Caputo wrote: > On May 7, 2012, at 7:48 PM, toan wro

Re: Parsing NMON data (CSV)

2012-02-29 Thread Bill Allen
Use incanter. On Feb 27, 2012 2:29 PM, "meteorfox" wrote: > Thanks for the suggestion but I'm already using it to parse it, it's > really simple to use. > > What I really meant is, what could be a good library for making graphs > based on sampled data?. > > Suppose I have the following > > , , ,

Re: Best IDE

2012-01-20 Thread Bill Allen
Agreed. I find paredit mode essential for any serious coding. That said, there are brief periods in which I find I like it off. On Jan 19, 2012 1:57 PM, "Sean Corfield" wrote: > On Thu, Jan 19, 2012 at 9:07 AM, Laurent PETIT > wrote: > > I've tried paredit in emacs, found it really cool, and por

Re: Actors not good for concurrency model

2010-05-18 Thread Bill Allen
On Sun, May 16, 2010 at 3:19 PM, Fabio Kaminski wrote: > Sorry about using the list like twitter.. > > but i thought this is a pretty good "article" about functional programming > side effects, and why actors are not very good design decision.. > > Actors not good for concurrency model : > > http:

Re: Arguments for < and > et al

2010-04-22 Thread Bill Allen
I thought there might be a performance reason in there. Thanks for the pointer to clj-time. Looks like a huge improvement over java date/calendar. BTW: love the book. Mine is already getting dog eared. On Apr 21, 2010 8:24 AM, "Stuart Halloway" wrote: The built-in Java comparison operators don'

Arguments for < and > et al

2010-04-21 Thread Bill Allen
I've been writing a program that requires the use of java.util.Calendar and its descendent java.util.GregorianCalendar. One thing I'd hoped to do was compare two Calendar objects with <, but the compiler complained that the arguments to < didn't inherit from Number which was a surprise to me becaus

Re: Clojure development environments

2009-12-06 Thread Bill Allen
Using the standard snu emacs on ubuntu 8.04 and on windows xp (no jocks about my up-to-dateness), it really was that easy. One difference is that I installed the emacs starter kit which installs elpa and other generally nice packages. Don't let the name put you off. I've been an emacs user for > 2

Re: API pages

2009-12-05 Thread Bill Allen
I have the same problem with FF 3.5. I use chrome to get the full doc. On Dec 3, 2009 12:25 AM, "Sean Devlin" wrote: Hey, the API page doesn't look right in Firefox 3.5 The cut off around halfway through the page. I think this also happens in Safari, but I'm not sure right now. Oh, and IE 6..

Re: Clojure User Survey, preparation for 1.1

2009-11-23 Thread Bill Allen
Stuart, I think there's another valid option for "getting" clojure. I got it by installing the unfortunately titled "Emacs Starter Kit" from http://github.com/technomancy/emacs-starter-kit. I has an install clojure option that does most of the work of installing clojure, clojure-contrib and setting