car = head
letting the compiler infer the type, or
car :: [a] -> a
car = head
for the explicit version.
-Ross
On Oct 6, 2009, at 10:01 PM, michael rice wrote:
How do I create an alias for a function, like giving CAR the same
functionality as HEAD. I know I can do it by creating a definition
(see below), but is there a better way, like Scheme's
(define head car)
car :: [a] -> a
car x = head x
The reason for doing this is to more closely mirror legacy code.
Michael
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe