Noogλe

search input

Function of the day

  • Returns the last element of a list.

    This function throws an error if the list is empty.

    Inputs

    list

    1. Function argument

    Type

    last :: [a] -> a
    

    Examples

    lib.lists.last usage example

    last [ 1 2 3 ]
    => 3