fx+(3scm) Scheme Programmer's Manual fx+(3scm)

fx+, fx* - fixnum addition and multiplication

(import (rnrs))                     ;R6RS
(import (rnrs arithmetic fixnums))  ;R6RS

(fx+ fx1 fx2)
(fx* fx1 fx2)

These procedures return the sum or product of their arguments, provided that sum or product is a fixnum.

The sum or product of the arguments.

(fx+ 2 3)                  => 5
(fx* 2 3)                  => 6
(fx+ (greatest-fixnum) 1)  => &implementation-restriction exception
(fx* (least-fixnum) -1)    => &implementation-restriction exception

This procedure can raise exceptions with the following condition types:
&implementation-restriction
Raised when the sum or product is not a fixnum.
&assertion
Raised when an argument is not a fixnum.

R6RS

fixnums(7scm)

This page is part of the scheme-manpages project. It includes materials from the RnRS documents. More information can be found at https://weinholt.se/scheme/manpages/.
2020-04-18