
28 Dec
2010
28 Dec
'10
2:23 p.m.
Hello all: I'd like to right a function that could take a structure with type (random example): (Int, (String, (Int, Int))) and another where each individual value is a Maybe of the corresponding type, for example: (Maybe Int, (Maybe String, (Maybe Int, Maybe Int))) and perform a fromMaybe using the values to produce a new value with the original types. The catch is, I'd like to be able to do that for an n-deep structure with any type, without having to write a separate function for them. I'm not even sure that this is possible, but perhaps someone could explain how it is or isn't? -- Edward Amsden Undergraduate Computer Science Rochester Institute of Technology www.edwardamsden.com