• Given a stream aStream, return its first element.

    Raises an error in case of an empty list. Does not evaluate anything.

    head is mostly an alias for car with error handling.

    Parameters

    • aStream: Stream<any>

      the list considered

    Returns any

    • the head of aStream if any