Plan 9 from Bell Labs’s /usr/web/sources/contrib/fernan/nhc98/src/prelude/PreludeList/Last.hs
module Prelude where last :: [a] -> a last [x] = x last (_:xs) = last xs last [] = error "PreludeList.last: empty list"