X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fprelude.js;h=92144360cd23e13267ba29a8e135853655b60875;hb=630200c35426d484b124fa473a69c40da33b1061;hp=162058e09b1c3077cafb15e574efe0e06f6ea0fd;hpb=6d622a8f09811bc4af366f28bd8f25b1022d4ffd;p=jscl.git diff --git a/src/prelude.js b/src/prelude.js index 162058e..9214436 100644 --- a/src/prelude.js +++ b/src/prelude.js @@ -4,6 +4,8 @@ var window = this; var nil; +var lisp = {}; + globalEval = eval; // Just an indirect eval function pv (x) { return x==undefined? nil: x; } @@ -59,7 +61,7 @@ function codepoints(string) { // Create and return a lisp string for the Javascript string STRING. function make_lisp_string (string){ var array = codepoints(string); - array.type = 'character' + array.stringp = 1 return array; } @@ -112,7 +114,7 @@ function Symbol(name, package_name){ } function lisp_to_js (x) { - if (typeof x == 'object' && 'length' in x && x.type == 'character') + if (typeof x == 'object' && 'length' in x && x.stringp == 1) return xstring(x); else if (typeof x == 'function'){ // Trampoline calling the Lisp function