ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Problems.P01

Description

Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P01.

Synopsis

Documentation

myLast :: [a] -> Maybe a Source #

Find the last element of a list.

Examples

>>> myLast [1,2,3,4]
Just 4
>>> myLast ['x','y','z']
Just 'z'
>>> myLast []
Nothing