[Haskell-beginners] flip lookup in ghci
Matt R
mattrussell324 at googlemail.com
Fri Feb 20 07:44:30 EST 2009
Rafael Gustavo da Cunha Pereira Pinto <RafaelGCPP.Linux at gmail.com>:
> you are applying the type to lookup only!
>
> try let lookupIn = ((flip lookup ) :: (Eq a) => [(a, b)] -> a -> Maybe b )
Oops, I didn't mean to include my attempts at type annotation in my
previous email...I meant to write
ghci> let lookupIn = flip lookup
But it doesn't seem to make any difference either way. I still get
ghci> :t lookupIn
lookupIn :: [((), b)] -> () -> Maybe b
regardless :(
-- Matt
More information about the Beginners
mailing list