Mon, 13 Nov 2000 04:13:07 -0500
You could make a type like this:
data C a b = Raw b | Cooked ( a -> C a b )
ap :: C a b -> a -> C a b
ap (Cooked f) v = f v
cook :: C a (a -> t) -> C a t
cook (Cooked f) = Cooked g
g a = cook (f a)
cook (Raw f) = Cooked g
g a = Raw (f a)
foo x y z = x <= y && y <= z
f3 = cook $ cook $ cook $ Raw foo
test = f3 `ap` 1 `ap` 2 `ap` 3
Though you could do something similar with a list-based approach.
At 20:12 2000-11-12 -0800, you wrote:
>I would like to be able to make a list that contains functions which take
>arguments of a certain type 'a'. However I don't know how many 'a'
>arguments there are. For example I'd like to be able to make a list of
>f,g, and h.
>I want to be able to curry the a's one at a time.