Skip to content

Instantly share code, notes, and snippets.

@40detectives
40detectives / partial_function_application.js
Created November 3, 2020 20:33 — forked from pauladam/partial_function_application.js
Practical example of function currying in JS
// I have some code that needs to use the following
// construct repeatedly
for(i=0;i<classes.length;i++){
var c = classes[i];
for(j=0;j<centers.length;j++){
var k = centers[k];
// do something with [c,k], like,
// demand[[c,k]] = expression;