Entry tags:
the thing I do too many times, but can't find the right word for
val listMaybe: Result[List[X]] = ...
val extractionResults: Result[List[Result[Y]]] = listMaybe map process
extractionResults map traverse flatten
I have a result of type
Result[List[Result[Y]]]
; now I traverse the internal list (if it exists), obtaining Result[Result[List[Y]]]
, then I have to flatten it to get Result[List[Y]]
.Either I'm doing something non-kosher, or I need a word for this "map traverse flatten" thingie.