Haskell代码中经常出现以下模式.是否有更短的方式来写它?
if pred x then Just x else Nothing
haskell if-statement combinators maybe
combinators ×1
haskell ×1
if-statement ×1
maybe ×1