Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

I MENA HASKAL

Name: Anonymous 2011-04-20 16:00

Is there any way to do something like this in Haskell?

f g = (g 1, g 'a') -- f id should return (1, 'a')

This is a simplified example, my problem is that I have a function that takes a function of type ([a] -> b) -> b and I want to use it twice, once as ([a] -> [a]) -> [a] and once as ([a] -> a) -> a.

Thanks.

Name: Anonymous 2011-04-20 16:38

lolol is ur dof ded

U MENA HASKAL

Name: Anonymous 2011-04-20 16:54

>>2
Thanks for your help.

But yeah, after thinking about the problem I realized why what I'm trying to do shouldn't be allowed. So is there a better way to do this?

Name: Anonymous 2011-04-20 18:10

I'm not too big on Haskell, but if I'm reading what you want to do right, you'd pretty much need a macro. Maybe you could do it with Template Haskell, but I've never used it.

And I'm not sure why you would use that retarded title on a presumably serious post, except to attract spam.

Name: Anonymous 2011-04-20 20:40

dmehosting. it has a cheap and decent linux vps plan.

y'oure welcome's

Name: Anonymous 2011-04-20 20:45

>>5 fucking shit wrong thread again. i hate posting from a cellphone

Don't change these.
Name: Email:
Entire Thread Thread List