LaserScheme Primitive Procedures:


Special Forms

include

(include string (URL))
Include evaluates the second sub-expression, which must evaluate to a string holding a valid URL. Include then loads the laser source code from the URL and evaluates it in the current environment.

define

(define environment,
            name,
            value)
Define binds name to value in the current environment.

lambda

(lambda (arg1...argn),
            line1,
            line2...)
the function that makes a function.

set!

(set!var,
            value)
If variable is bound in the current environment, set! Changes the binding so it�s bound to the new value. If it does not exist in the current envronment, it tries to set! In the current environment�s parent enviornment. Return value is unspecified.

cond

(cond(cond,.
            consequent)...)
evals expression, goes to next until it finds true expression when finds true expression, returns evalusation of thing to do

if

(iftest,
    cond,
    alt)
if expr is true, returns value of the evaluation of the true expression, if false, returns evaluation of false expression

quote

(quoteany)
lets you prevent a symbol from being evaluated - returns the expression itself

remote-set!

(remote-set!environment...)
does the same thing set! Does , but in the specified environment.

remote-define!

(remote-define!envionment)
does the same thing define! Does, but in the specified envionement.

current-environment

(current-environment)
Evaluates to the current environment.

let

(letany)
creates a new envionment which has the current env as the parent, and evaluates the right hand side of all the bindings in the current env, and binds them in the new env. Then in evaluates body in the new env.

let*

(let*any)
same as let, but evaluates in the new env. Evals in order they are listed.

Something other than Special Forms

get-file

(get-file string (URL))
Loads a file and returns it as a scheme string. If a filename begins with a net protocol (ftp:, file:, or http:) that protocol is used to fetch the file.

flatten-tree

(flatten-tree tree)
Returns a list of all the nodes in the tree.

(flatten-tree tree)
Returns a list of all the nodes in the tree.



© 1996, Morgan McGuire ([email protected]) and Laura Wollstadt ([email protected]).
All rights reserved

LBW 12/09/96