It is preferrable not to use expressions with side effects in monadic transformations (
map
,
flatMap
and
filter
). Consider moving the monadic transformations to a separate
foreach
pass.