Scheme types in Java

All Scheme values are implemented by sub-classes of ‘java.lang.Object’.

Scheme symbols are implemented using java.lang.String. (Don’t be confused by the fact the Scheme sybols are represented using Java Strings, while Scheme strings are represented by gnu.lists.FString. It is just that the semantics of Java strings match Scheme symbols, but do not match mutable Scheme strings.) Interned symbols are presented as interned Strings. (Note that with JDK 1.1 string literals are automatically interned.)

Scheme integers are implemented by gnu.math.IntNum. Use the make static function to create a new IntNum from an int or a long. Use the intValue or longValue methods to get the int or long value of an IntNum.

A Scheme "flonum" is implemented by gnu.math.DFloNum.

A Scheme pair is implemented by gnu.lists.Pair.

A Scheme vector is implemented by gnu.lists.FVectror.

Scheme characters are implemented using gnu.text.Char.

Scheme strings are implemented using gnu.lists.FString.

Scheme procedures are all sub-classes of gnu.mapping.Procedure. The "action" of a ‘Procedure’ is invoked by using one of the ‘apply*’ methods: ‘apply0’, ‘apply1’, ‘apply2’, ‘apply3’, ‘apply4’, or ‘applyN’. Various sub-class of ‘Procedure’ provide defaults for the various ‘apply*’ methods. For example, a ‘Procedure2’ is used by 2-argument procedures. The ‘Procedure2’ class provides implementations of all the ‘apply*’ methods exceptapply2’, which must be provided by any class that extends Procedure2.