modelling Camels : I started the convo, so I gotta chronicle it

Submitted by metaperl on Mon, 04/24/2006 - 8:51pm.

[19:43:51] /metaperl/ I was trying to make the leap from data Sheep = (name::String, mother::Maybe Sheep, father::Maybe Sheep) to camels....
[19:44:19] /Cale/ (that is, not quite fields)
[19:44:42] /sjanssen_/ metaperl: perhaps a good encoding is "data Camel a b c = Camel a b (Maybe c)"
[19:44:55] /metaperl/ sjanssen_: very clever!
[19:44:57] /metaperl/ :)
[19:45:42] /metaperl/ I like to name the type and data constructor distinctly though: data CamelType a b c = Camel a b (Maybe c)
[19:47:14] /Cale/ data Camel a b = Dromedary a | Bactrian a b
[19:47:45] /metaperl/ nice Cale
[19:49:25] /Cale/ I'm not sure what kind of Camel would have 3 humps though.
[19:49:31] /goltrpoat/ an Objective one.
[19:49:41] /Korollary/ A souped-up camel
[19:49:44] /Korollary/ long range
[19:49:52] /sjanssen_/ a camel with a massive tumor?
[19:50:20] /Cale/ an intercontinental ballistic camel
[19:50:29] /Lokadin/ lol
[19:51:06] /Cale/ the extra 'hump' is a warhead
[19:51:47] /goltrpoat/ embedded by INRIA