1.3.1 • Published 9 years ago

hoff v1.3.1

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

hoff - Higher Order Function File

npm version travis build information Coverage Status

hoff

Overview

Hoff is a collection of higher order functions. I don't really have a goal here other than to show that these high-level functions are really easy to write in ES6. And I thought the name hoff would be cool for a library of HOFs so here it is.

Functions

  • compose - wraps functions f(x) and g(x) such that g(f(x)).
  • sequence - wraps functions f(x) and g(x) such that f(g(x)).
  • partial - partially applies a function f with the arguments given and returns a function that waits for the remaining arguments.
  • curry - will return functions until the number of arguments given matches or exceeds the number of arguments in function f, then returns the value of the function's execution.
  • identity - returns a function that returns a stored value. Nothing fancy.
  • not - returns a function that returns the negation of the function invocation.
  • partition - Splits an array in two based on a predicate function: [elementsThatMatch, elementsThatDontMatch].

You should write more functions to do __.

You're absolutely right! File an issue!