
15 Mar
2011
15 Mar
'11
8:42 p.m.
On 03/15/11 16:18, Britt Anderson wrote:
Or can I do something like
instance Monoid MyDat where mempty = Mydat [] 0 mappend a b = (Mydat (mappend (list1 a) (list1 b)) (item1 a))
without defining an instance for Float?
Yes, you can do this. Try it! Does it typecheck? Then there's a large chance it's correct! (In addition to more-philosophical reasons.) -Isaac