Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix irregular list parsing and pair-based refer

  • Loading branch information...
commit d2b31b8230e0138f019cc06bbf22bad9b4a6ec19 1 parent de07be1
@jondistad authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 javascripts/repl.js
View
4 javascripts/repl.js
@@ -141,7 +141,7 @@ function Fn(form, fn) {
var ref = arguments[i];
switch (type(ref)) {
case "Cons":
- this[car(ref).sym] = eval(cdr(ref));
+ this[cdr(ref).sym] = eval(car(ref).sym);
break;
case "Symbol":
this[ref.sym] = eval(ref.sym);
@@ -239,7 +239,7 @@ function Fn(form, fn) {
function readList(input, idx) {
input.jump();
var cur = input.getc();
- if (cur == "." && input.peek() == " ") {
+ if (cur == "." && /\s/.test(input.peek())) {
var form = readForm(input);
input.jump();
if (input.getc() != ")") throw('only one form may come after " . "');
Please sign in to comment.
Something went wrong with that request. Please try again.