[Haskell-cafe] n00b question: defining datatype

Anton van Straaten anton at appsolutions.com
Thu Jul 23 15:18:50 EDT 2009

Kim-Ee Yeoh wrote:
> Consider
> data Task = Task { title :: String, completed :: Bool, subtasks :: Maybe
> [Task] }

Note that unless you have some meaning in mind for the difference 
between a subtask value of Nothing vs. (Just []), the Maybe is redundant.


More information about the Haskell-Cafe mailing list