
7 Jun
2010
7 Jun
'10
2:40 p.m.
How should I work around that. I could use two different "name" function, but I don't like this. Would I have to define a typeclass "namedFunction" which all have a "name" function?
How about a "named" type: data Named a = Named { val_of :: a, name_of :: String } You can put it in Functor and Applicative to get some nice syntax for modifying the value.