From 16876343a4c393c82ea71f892fbc08840847771d Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 23 Oct 2015 18:24:19 -0400 Subject: [PATCH] Map Syntax by construction. --- prototype/UI/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prototype/UI/index.html b/prototype/UI/index.html index d9b2229ff..293a07175 100644 --- a/prototype/UI/index.html +++ b/prototype/UI/index.html @@ -232,9 +232,9 @@ // forall a b. Syntax a -> (a -> b) -> Syntax b Syntax.prototype.map = function(transform) { - if (this.indexed != null) { return new Syntax(this.indexed, transform); } - if (this.keyed != null) { return new Syntax(this.keyed, transform); } - if (this.leaf != null) { return new Syntax(this.leaf, transform); } + if (this.indexed != null) { return new Syntax(this, transform); } + if (this.keyed != null) { return new Syntax(this, transform); } + if (this.leaf != null) { return new Syntax(this, transform); } } function Diff(json) {