Skip to content

lastElement : List a -> a #2

Description

@renovatorruler

Create a function (like the sum : List Int -> Int we created yesterday) called lastElement which will take a List a and return the last element of the list.

λ> lastElement [1,2,3,4]
4
λ> lastElement ['x','y','z']
'z'

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions