Skip to content

Instantly share code, notes, and snippets.

View mkherlakian's full-sized avatar

Maurice Kherlakian mkherlakian

View GitHub Profile
@mkherlakian
mkherlakian / currying.md
Created February 22, 2021 18:54 — forked from donnut/currying.md
TypeScript and currying

TypeScript and currying

In functional programming you often want to apply a function partly. A simple example is a function add. It would be nice if we could use add like:

var res2 = add(1, 3); // => 4

var add10To = add(10);
var res = add10To(5); // => 15