Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import { from } from "fromfrom";
var sequence = from([1, 2, 3, 4])
.map(x => {
console.log(x);
return x;
})
.filter(x => x > 2);
// Nothing is printed the console yet
var result = sequence.toArray(); // .toArray() forces the evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.