Input: [Just "foo", Just "bar", Nothing, Just "quux"]
Output: ["foo", "bar", "quux"]
I am not satisfied with the following solution using fromJust , because it is not very portable for elm, which does not like unsafe functions:
extract list = map fromJust $ filter isJust list
Is there another concise / idiomatic way to achieve this?
source share