[Haskell-cafe] Creating an alias for a function
Alex Queiroz
asandroq at gmail.com
Tue Oct 6 22:02:32 EDT 2009
Hallo,
On Tue, Oct 6, 2009 at 11:01 PM, michael rice <nowgate at yahoo.com> 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.
>
Just do:
car = head
--
-alex
http://www.ventonegro.org/
More information about the Haskell-Cafe
mailing list