2 A scheme object is anything that can be considered a value in Scheme. Notice that:
4 - Any symbolic expression can be an object (through the use of quote).
5 - Some objects have a literal representation in the program (can be read), but others don't: Closures and Continuations are created through evaluation of some other expressions.
8 type symbol
= string ;;
17 | Quotation
of scheme_object
18 | ProperList
of scheme_object list
19 | ImproperList
of (scheme_object list
) * scheme_object
20 | Closure
of scheme_object
* scheme_environment
* (symbol list
)
21 | Builtin
of ((scheme_object list
) -> (scheme_object
option))
22 | Continuation
of scheme_environment
* (scheme_object list
) * (scheme_object list list
)
23 | RestoreEnv
of scheme_environment
25 | Cond
of (scheme_object
* scheme_object
)
29 environment_frame
= (string, scheme_object
) Hashtbl.t
31 scheme_environment
= environment_frame list
34 exception Scheme_cast_error
;;
35 exception Scheme_eval_error
of string;;
36 exception Scheme_user_error
of scheme_object list
;;