3 ms·
If you have a macro then something like "do notation" could be done in a superset of JavaScript, such as something like this: const listMonad=(m,f)=>[].conca
by zzo38computer 7y ago
If you have a macro then something like "do notation" could be done in a superset of JavaScript, such as something like this:
const listMonad=(m,f)=>[].concat(...m.map(f));
const x=listMonad*>{
let a=yield [1,2,9];
let b=yield [3,4,5,7];
return a-b;
};
Such a code can then be compiled into a ordinary JavaScript code.