View Source Document

head.robin

;'<<SPEC'

### `head` ###

    -> Tests for functionality "Evaluate core Robin Expression"

`head` evaluates its argument to a list, and evaluates to the first element
of that list.

    | (head (prepend #t ()))
    = #t

`head` expects its argument to be a list.

    | (head #f)
    ? abort (expected-list #f)

`head` expects exactly one argument.

    | (head (prepend #t ()) (prepend #f ()))
    ? abort (illegal-arguments ((prepend #t ()) (prepend #f ())))

    | (head)
    ? abort (illegal-arguments ())

`head` is basically equivalent to Scheme's `car`.

'<<SPEC'

(require head)