Re: Reduce + merge-with error on lazy sequence of maps

2016-02-13 Thread Nathan Smutz
Thanks James, There was definitely a missing aggregation step in there. I appreciate your eyeballing it. Best, Nathan -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts fro

Re: Reduce + merge-with error on lazy sequence of maps

2016-02-11 Thread James Reeves
There are a couple of errors in your code: 1. You have no initial value for the reduce, yet your output seems different to your input 2. prioritized-courses returns a seq, but merge-demand expects a map My guess is that you only get the error when you hit data in your input sequence with the same

Reduce + merge-with error on lazy sequence of maps

2016-02-11 Thread Nathan Smutz
Hi all, I've had a case where reduce with merging operations throws errors on lazy sequences. I thought I should check in for insight before logging a bug. Maybe using maps as keys has something to do with it. too (I've since refactored) (reduce merge-student-demand everybody) Throws: Il