On Wednesday, 20 December 2017 at 15:28:00 UTC, Christian Köstlin
wrote:
When working with json data files, that we're a little bigger
than
convenient I stumbled upon a strange behavior with joining of
mapresults
(I understand that this is more or less flatmap).
I mapped inputfiles, to JSONValues, from which I took out some
arrays,
whose content I wanted to join.
Although the joiner is at the end of the functional pipe, it
led to
calling of the parsing code twice.
I tried to reduce the problem:
[...]
you need to memorize I guess, map is lazy.