-
-
Save dimitris-papadimitriou-chr/8ea901d53198aa60fb9325026b4308ba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.prototype.getIterator = function () { | |
var self = this; | |
return { | |
*[Symbol.iterator]() { | |
{ | |
var content = self.fold([],(acc,e)=>acc.concat( e ) ) | |
for (var element of content) yield element; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment