« Return to Thread: foild function for expressions

Re: foild function for expressions

by Ryan Ingram :: Rate this Message:

Reply to Author | View in Thread

On 12/3/07, Kalman Noel <kalman.noel@...> wrote:
You're confusing sum and product types. That is, you're using a product type,
but you probably need a sum type, like this:
 
I'm not so sure; it looks like they already have that type (Exp) and wants to use AlgExp to hold the "folding" functions used.
 
Carlo, I think you're on the right track. Think of it this way: you have some Exps and you want to get some things of type "a" to pass to the functions in alg.  How could you get those things with what you have so far?
 
  -- ryan

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@...
http://www.haskell.org/mailman/listinfo/haskell-cafe

 « Return to Thread: foild function for expressions