[CLJ-1616] Frequencies incompatible with eduction Created: 14/Dec/14 Updated: 14/Dec/14 Resolved: 14/Dec/14
Cause: The reduce function that 'frequencies' calls is lacking the completing arity.
Simplest fix is to add the completing arity. Could be useful to allow frequencies to take a transducer stack.
mapv/filterv are similarly affected but seem less useful than using into with transducers.
|Comment by Alex Miller [ 14/Dec/14 8:14 PM ]|
|Comment by Ghadi Shayban [ 14/Dec/14 9:11 PM ]|
No, not when there is something like 'take' in the picture. Transducers imply a reducing function with two different arities . When 'frequencies' reduces over the collection (the eduction), a transducer inside the eduction might terminate early and cause the arity-1 rfn to be called, which will eventually bottom out here and throw the missing arity. 
|Comment by Alex Miller [ 14/Dec/14 9:49 PM ]|
|Comment by Ghadi Shayban [ 14/Dec/14 10:42 PM ]|
Sigh you're not missing anything. I have an active repl that I can reproduce this on...
|Comment by Ghadi Shayban [ 14/Dec/14 10:49 PM ]|
I'll reopen if I can figure out what happened