-
Notifications
You must be signed in to change notification settings - Fork 0
schemeAPI
============== API for Scheme ==============
PScheme is striving for compatibility with R5RS specification of the Scheme language.
An unspecified value. Returned by functions like set!
or display
.
- Literals
- none
- Predicates
- none
- Equality
-
eq?
,eqv
,equal?
- identity - Evaluates to
- Itself
A Boolean True or False. Following R5RS specification all other expressions equal to boolean True.
- Literals
-
#t
,#f
- Predicates
bool?
- Equality
-
eq?
- identityeqv?
,equal?
- value - Evaluates to
- Itself
Character type. PScheme uses unicode characters, roughly matching R6RS specification.
- Literals
-
#\c
,#\name
,#\xhh
,#\uhhhh
,#\Uhhhhhh
, where:name
= {space
,newline
}h
= {0-9, a-f}c
= ascii character literal, exceptspace
and control codes - Predicates
char?
- Equality
-
eq?
, - identityeqv?
,equal?
- value - Evaluates to
- Itself
Character String type. As for the Char type, PScheme uses unicode strings.
- Literals
-
"c[c]"
, wherec
- ascii character literal"\C[\C]"
, whereC
= {0
,f
,r
,n
,t
,b
}"\xhh[\xhh]"
,"\uhhhh[\uhhhh]"
,"\Uhhhhhh[\Uhhhhhh]"
, whereh
= {0
-9
,a
-f
} - Predicates
string?
- Equality
-
eq?
,eqv?
- identityequal?
- value - Evaluates to
- Itself
Abstract number
- Literals
- Sum of literals of Integer_, Fractional_, Real_, and Complex_ numbers.
- Predicates
number?
- Equality
-
eq?
- identityeqv?
,equal?
- value - Evaluates to
- Itself
Arbitrary length integer number. It is the only exact
number in PScheme. Implemented using
Python's long
numbers.
- Literals
-
[+/-]ddd
- Predicates
-
number?
,exact?
- Equality
-
eq?
- identityeqv?
,equal?
- value - Evaluates to
- Itself
Not implemented.
A floating point number. Implemented using Python's float
numbers.
- Literals
-
[+/-]ddd.ddd[e[+/-]d+]
- Predicates
-
number?
,exact?
- Equality
-
eq?
- identityeqv?
,equal?
- value - Evaluates to
- Itself
Complex Number
t.b.d.
An empty list.
- Literals
-
'()
(quote ())
- Predicates
-
null?
,list?
- Equality
-
eq?
- identityeqv?
,equal?
- value - Evaluates to
- Itself
A pair of two objects or a list if terminated with Null.
- Literals
-
'(a . b)
'(a a-pair)
'(a [a])
- Predicates
-
pair?
list?
, if terminated with Null - Equality
-
eq?
,eqv?
- identityequal?
- value - Evaluates to
- Itself
An identifier.
- Literals
-
'name
- Predicates
-
symbol?
- Equality
-
eq?
,eqv?
,equal?
- identity - Evaluates to
- Itself
A symbol, which was previously defined or bound to a value and was not quoted evaluates to that value.
- Literals
-
name
- Predicates
-
same as for the type of the returned value
- Equality
-
depends on the type of the returned value
- Evaluates to
- An earlier defined or bound value. Follows lexical scoping.
An object representing a procedure - a snippet of code that when applied to a list of arguments executes the code and returns a value.
- Literals
-
Same as Symbol, which was earlier bound to a Procedure object.
- Predicates
-
procedure?
- Equality
-
eq?
,eqv?
,equal?
- identity - Evaluates to
- Itself
- Literals
-
(procedure_name [list_of_arguments])
- Predicates
-
same as for the type of the returned value
- Equality
-
depends on the type of the returned value
- Evaluates to
- A result of application of the Procedure to a list of arguments.