3 ms·
keep the Maybe types from taking everything over. Pattern matching on Maybe types is rather unidiomatic Haskell. Much better to take advantage of the type clas
by chongli 6y ago
keep the Maybe types from taking everything over.
Pattern matching on Maybe types is rather unidiomatic Haskell. Much better to take advantage of the type classes to which Maybe belongs: Functor, Applicative, Monad. In particular, there's no need to unwrap/wrap the Maybe value when you have `fmap`.