maybe package:dhall

Decode a Maybe.
>>> input (maybe natural) "Some 1"
Just 1
Transform all values in a Map using the supplied function, deleting the key if the function returns Nothing
>>> mapMaybe Data.Maybe.listToMaybe (fromList [("C",[1]),("B",[]),("A",[3])])
fromList [("C",1),("A",3)]