Skip to content

Instantly share code, notes, and snippets.

View dwweb0309's full-sized avatar

dwweb0309

View GitHub Profile
@VonHeikemen
VonHeikemen / example-transducers-v1.js
Created December 26, 2020 19:07
Contrived example of transducers in action
// Common Utilities
function compose(...fns) {
const apply = (arg, fn) => fn(arg);
return (initial) => fns.reduceRight(apply, initial);
}
function curry(arity, fn, ...rest) {
if(arity <= rest.length) {
return fn(...rest);