git @ Cat's Eye Technologies Robin / 0.3 stdlib / symbol-p.robin
0.3

Tree @0.3 (Download .tar.gz)

symbol-p.robin @0.3raw · history · blame

;'<<SPEC'

### `symbol?` ###

    -> Tests for functionality "Interpret core Robin Program"

`symbol?` evaluates its argument, then evaluates to `#t` if it is a symbol,
`#f` otherwise.

    | (define literal (macro (s a e) (head a)))
    | (display
    |   (symbol? (literal this-symbol)))
    = #t

Numbers are not symbols.

    | (display
    |   (symbol? 9))
    = #f

Lists are not symbols.

    | (display
    |   (symbol? (prepend 1 ())))
    = #f

The argument to `symbol?` may (naturally) be any type, but there must be
exactly one argument.

    | (display
    |   (symbol? 77 88))
    ? uncaught exception: (illegal-arguments (77 88))

    | (display
    |   (symbol?))
    ? uncaught exception: (illegal-arguments ())

'<<SPEC'