Closed sbrunk closed 7 years ago
Calling evaluate() on an Output without a feed argument causes a java.lang.UnsupportedOperationException: empty.reduceLeft
evaluate()
java.lang.UnsupportedOperationException: empty.reduceLeft
The direct fix would be to replace reduce by a fold, like this:
FeedMap(feeds.toSeq.map(f => ev.feed(f._1, f._2)).fold(Map.empty)(_ ++ _))
I think using just flatMap is simpler but should still be equivalent.
Good catch! Thanks! :)
Calling
evaluate()
on an Output without a feed argument causes ajava.lang.UnsupportedOperationException: empty.reduceLeft
The direct fix would be to replace reduce by a fold, like this:
I think using just flatMap is simpler but should still be equivalent.