Skip to content

Instantly share code, notes, and snippets.

@dbrack
Last active July 19, 2017 13:26
Show Gist options
  • Select an option

  • Save dbrack/a7dc3dbd1e4ff8ed375f to your computer and use it in GitHub Desktop.

Select an option

Save dbrack/a7dc3dbd1e4ff8ed375f to your computer and use it in GitHub Desktop.
Functors and higher order functions - definition

objects that implement map are functors. So, Array is a functor. and Array.filter is a higher order function

a little more abstract..

a functor is an object which acts as a container for a value, which then allows you to APPLY one or more functions to that value, and returns a new functor (in case of .map(), an Array) containing the transformed value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment