Why Sum Types Matter in Haskell
Will Kurt

Nice. Any suggestion how you would handle optional parameters in your data types? I have seen something like (made up example)

data Collectible = Collectible {name :: String, price :: Int, suitableForKids :: Maybe Boolean}

Some recommend this, but it comes with warning on -Wmissing-fields

The aim would be to handle non-compulsory items ( and note, I am not after default values — the Web is full o suggestons on this).


Like what you read? Give martin tomko a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.