mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Map Syntax by construction.
This commit is contained in:
parent
08927d06b5
commit
16876343a4
@ -232,9 +232,9 @@
|
|||||||
|
|
||||||
// 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.indexed, transform); }
|
if (this.indexed != null) { return new Syntax(this, transform); }
|
||||||
if (this.keyed != null) { return new Syntax(this.keyed, transform); }
|
if (this.keyed != null) { return new Syntax(this, transform); }
|
||||||
if (this.leaf != null) { return new Syntax(this.leaf, transform); }
|
if (this.leaf != null) { return new Syntax(this, transform); }
|
||||||
}
|
}
|
||||||
|
|
||||||
function Diff(json) {
|
function Diff(json) {
|
||||||
|
Loading…
Reference in New Issue
Block a user