-- untested and won't work on an infinite list
last :: [a] -> a
last = head . reverse

-deech

On Fri, Dec 31, 2010 at 2:39 PM, Aaron Gray <[email protected]> wrote:
> Is there an easy Haskell function that gets the last Char of a [Char] or
> String ?
> Many thanks in advance,
> Aaron
>
> _______________________________________________
> 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

Reply via email to