MispStandards.misp
Spreitzer, July 23, 1985 0:15:23 am PDT
(setq
defun
(nlambda
((name args body env1) env2)
(eval
(list
(quote setq)
name
(list
(quote lambda)
args
body
)
)
(if (eq nil env1) env2 (eval env1 env2))
)
)
)
(setq
ndefun
(nlambda
((name args body env1) env2)
(eval
(list
(quote setq)
name
(list
(quote nlambda)
args
body
)
)
(if (eq nil env1) env2 (eval env1 env2))
)
)
)
(defun null (l) (eq l nil))
(defun nthTail (n l) (do ((n n (minus n 1)) (l l (cdr l))) ((gt n 0) l) nil))
(ndefun curEnv (args env) env)
(defun type (x)
(letrec
(
(s (cedar "IO.ROS[]"))
(y (cedar "PrintTV.PrintType[SafeStorage.GetReferentType[x], s]"))
(z (cedar "IO.RopeFromROS[s]"))
)
z
)
)
(defun type (x)
(cedarStmt "{
&yield[SafeStorage.GetReferentType[x]]
}"
)
)
(defun fmtType (x)
(cedarStmt "{
s: IO.STREAM ← IO.ROS[];
IO.PutRope[s, \"REF \"];
PrintTV.PrintType[SafeStorage.GetReferentType[x], s];
&yield[IO.RopeFromROS[s]]
}"
)
)
(defun type (x)
(let
((z 1))
(prog
(cedar "{
s: IO.STREAM ← IO.ROS[];
PrintTV.PrintType[SafeStorage.GetReferentType[x], s];
z ← IO.RopeFromROS[s]
}"
)
z
)
)
)
(defun type (x)
(cedar "{
Foo: PROC RETURNS [REF ANY] = {
s: IO.STREAM ← IO.ROS[];
PrintTV.PrintType[SafeStorage.GetReferentType[x], s];
RETURN [IO.RopeFromROS[s]]
};
z ← Foo[];
}"
)
)