Re: Folding a reducer inside of a fold

2012-08-22 Thread Joshua Ballanco
On Wed, Aug 22, 2012 at 10:48:03AM +0100, nicolas.o...@gmail.com wrote: > > In particular, if I attempt to replace the `r/reduce` call on line #23, > > with a call to `r/fold`, I get the following crash: > > > This calss sems strange. > remaining? should represent a monoid for it to work. > > Mean

Re: Folding a reducer inside of a fold

2012-08-22 Thread nicolas.o...@gmail.com
> In particular, if I attempt to replace the `r/reduce` call on line #23, > with a call to `r/fold`, I get the following crash: > This calss sems strange. remaining? should represent a monoid for it to work. Meaning two functions: 1 -> A and (A -> A -> A) In your code, the case with no arg return

Folding a reducer inside of a fold

2012-08-21 Thread Joshua Ballanco
I've been playing with reducers recently, and I discovered what might be a bug. The core of the problem can be seen here: https://github.com/jballanc/scrabbler/blob/master/src/scrabbler/bruteforce.clj In particular, if I attempt to replace the `r/reduce` call on line #23, with a call to `r/fold`,