Skip to content

Instantly share code, notes, and snippets.

Avatar

Michal Dziekonski mdziekon

  • Warsaw, Poland
View GitHub Profile
@timhwang21
timhwang21 / curry-record.md
Last active Nov 8, 2019
Curry unary functions that take a record as an argument
View curry-record.md

curryRecord

This is an example of a function whose logic lives in the type definition rather than in the function body.

/**
 * @name `curryRecord`
 *
 * Takes a unary function that takes a record as an argument, and makes the
 * record partially applicable. Returns a new function that takes a partial of