[Haskell-cafe] Embedded Functions in Algebraic Data Types?

Don Stewart dons at galois.com
Sun Feb 10 14:49:53 EST 2008


mfeathers:
> On a lark, I loaded this into Hugs this morning, and it didn't complain:
> 
> 
> data Thing = Thing (Integer -> Integer)
> 
> 
> 
> But, I've never seen that sort of construct in an example.  Do people 
> ever embed functions in ADTs?
> 
> 
> Michael

What's the use of a functional language if you can't treat functions as
first class values :)

-- Don


More information about the Haskell-Cafe mailing list