[Haskell-cafe] Re: Ultra-newbie Question

Henrique Becker henriquebecker91 at gmail.com
Sun Sep 19 19:01:53 EDT 2010


Why not?

import Data.Number.Nat as N

lastN :: Integral b => b -> [a] -> [a]
lastN n xs = N.drop (N.length xs - n') xs
        where n' = N.toNat n

Not import Prelude maybe make more clear.

[]'s
Henrique Becker


More information about the Haskell-Cafe mailing list