so I guess there’s no way I go from ```(List<Tr...
# arrow
n
so I guess there’s no way I go from
Copy code
(List<Try<A>>) -> List<A>
with a simple flatmap
s
You can.
listOfTries.flatMap { trie -> trie.fold({ empyList()}, { a -> listOf(a)}) }
.
👍 1
Here you return an emptyList or no element in case of failure and you ignore the failure.
n
I see … more involved than I thought 🙂
thank you
s
You're welcome 👍
h
could something like
Copy code
listOfTries.map { it.toOption() }.flattenOption()
be useful for this?
arrow 1