Remix.run Logo
tosh an hour ago

apparently it is not what the author meant but:

using projection you can "call a function in two parts"

  add: {x+y}
  add4: add[4] / gives {4+x} by fixing 4 as first argument to {x+y}
  add4[2]      / gives 6
this is a useful pattern that you can use to first 'fix' data or behaviour to produce another function

https://en.wikipedia.org/wiki/Partial_application