[Haskell-cafe] n00b question: defining datatype

Max Rabkin max.rabkin at gmail.com
Thu Jul 23 14:45:23 EDT 2009


On Thu, Jul 23, 2009 at 8:43 PM, Iain Barnett<iainspeed at gmail.com> wrote:
> data Task = Task { title :: String, completed :: Bool, subtasks :: [Task] }
> But that's not really right, because obviously, some tasks don't have
> subtasks.

The empty list is a list.

--Max


More information about the Haskell-Cafe mailing list