1
1
mirror of https://github.com/github/semantic.git synced 2024-11-29 02:44:36 +03:00

Simplify Syntax.map.

This commit is contained in:
Rob Rix 2015-10-23 18:58:10 -04:00
parent 00234c1365
commit eb598effa5

View File

@ -150,9 +150,7 @@
// forall a b. Syntax a -> (a -> b) -> Syntax b // forall a b. Syntax a -> (a -> b) -> Syntax b
Syntax.prototype.map = function(transform) { Syntax.prototype.map = function(transform) {
if (this.indexed != null) { return new Syntax(this, transform); } return new Syntax(this, transform);
if (this.keyed != null) { return new Syntax(this, transform); }
if (this.leaf != null) { return new Syntax(this, transform); }
} }
function diffFromJSON(json) { function diffFromJSON(json) {