loquat-qo
v2.0.0
Published
Allow friendly syntax for loquat using generators
Downloads
7
Readme
loquat-qo
Allow friendly syntax for loquat using generators , like do-notation in Haskell.
Before:
const parser = parserA.bind(x =>
parserB.bind(y =>
perserC.bind(z =>
pure(something(x, y, z))
)
)
);
After:
const parser = qo(function* () {
const x = yield parserA;
const y = yield parserB;
const z = yield parserC;
return something(x, y, z);
});
See loquat repository for more information.