[Haskell-cafe] n00b question: defining datatype

Bulat Ziganshin bulat.ziganshin at gmail.com
Thu Jul 23 14:47:54 EDT 2009


Hello Iain,

Thursday, July 23, 2009, 10:43:02 PM, you wrote:

> data Task = Task { title :: String, completed :: Bool, subtasks :: [Task] }
> But that's not really right, because obviously, some tasks don't have subtasks.

don't see a problem - subtasks list may be empty


-- 
Best regards,
 Bulat                            mailto:Bulat.Ziganshin at gmail.com



More information about the Haskell-Cafe mailing list