View Source Document

subtract.robin

;'<<SPEC'

### `subtract` ###

    -> Tests for functionality "Evaluate core Robin Expression"

`subtract` evaluates its first argument to a number, then
evaluates its second argument to a number, then evaluates
to the difference between the first and second numbers.

    | (subtract 6 4)
    = 2

    | (subtract 1000 8000)
    = -7000

Addition may be accomplished by negating the second argument.

    | (subtract 999 (subtract 0 999))
    = 1998

`subtract` expects both of its arguments to be numbers.

    | (subtract #f 100)
    ? abort (expected-number #f)

    | (subtract 100 ())
    ? abort (expected-number ())

`subtract` expects exactly two arguments.

    | (subtract 100 200 300)
    ? abort (illegal-arguments (100 200 300))

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

'<<SPEC'

(require subtract)