>>8
How does flip id typecheck? It seems simple enough looking at the definition of flip, but I don't see how the types match up.
Name:
Anonymous2012-08-03 5:35
loeb, loeb, loeb, loeb, loeb, loeb, loeb, loeb, loeb.
There's nothing you can do that can't be done.
Nothing you can sing that can't be sung.
Nothing you can say but you can learn how to play the game
It's easy.
There's nothing you can make that can't be made.
No one you can save that can't be saved.
Nothing you can do but you can learn how to be you
in time - It's easy.
All you need is loeb, all you need is loeb,
All you need is loeb, loeb, loeb is all you need.
loeb, loeb, loeb, loeb, loeb, loeb, loeb, loeb, loeb.
All you need is loeb, all you need is loeb,
All you need is loeb, loeb, loeb is all you need.
There's nothing you can know that isn't known.
Nothing you can see that isn't shown.
Nowhere you can be that isn't where you're meant to be.
It's easy.
All you need is loeb, all you need is loeb,
All you need is loeb, loeb, loeb is all you need.
All you need is loeb (all together now)
All you need is loeb (everybody)
All you need is loeb, loeb, loeb is all you need.
Name:
Anonymous2012-08-03 6:46
>>13
flip :: (a -> b -> c) -> b -> a -> c
id :: a -> a
id@a->b :: (a -> b) -> a -> b
flip id@a->b :: a -> (a -> b) -> b
(\f a b -> f b a) id
(\a b -> id b a)
(\a b -> b a) :: a -> (a -> b) -> b
>>17
In Haskell, functions that take multiple arguments are function-returning functions (they are ``curried''). There's a reason for all the arrows in the types. That's why you can treat id as (a -> b) -> a -> b.
>>18
I know that, and I don't see how currying is related unless you're talking about why (a -> b) -> a -> b is the same as (a -> b) -> (a -> b), which I understand. I didn't know that it would substitute a -> b for a in the type signature of id.