git @ Cat's Eye Technologies Robin / master stdlib / empty-p.robin
master

Tree @master (Download .tar.gz)

empty-p.robin @masterraw · history · blame

;'<<SPEC'

<!--
Copyright (c) 2012-2024, Chris Pressey, Cat's Eye Technologies.
This file is distributed under a 2-clause BSD license.  See LICENSES/ dir.
SPDX-License-Identifier: LicenseRef-BSD-2-Clause-X-Robin
-->

### `empty?` ###

    -> Tests for functionality "Evaluate Robin Expression (with List)"

`empty?` evaluates its single argument, and evaluates to `#t` if that value
is the empty list, `#f` otherwise.

    |   (empty? (literal symbol))
    = #f

    |   (empty? ())
    = #t

    |   (empty? (list 1 2 3))
    = #f

'<<SPEC'

(define empty? (fun (li)
  (equal? li ())))