Sanfu 3.2.0

Combinators

Combinators

Source:

Functional combinators

Methods

starling(f, g, a) → {Any}

Source:
Signature:
  • (a -> b -> c) -> (a -> b) -> a -> c
Category:
  • Function

The staring combinator takes a binary function, an unary function and a value. It then applies the first function to the provided value and the result of applying the second function to that same value

Example
const add = a => b => a + b
const something = a => a * 9
S (add) (something) (2) 
// => 20
Parameters:
Name Type Description
f function

Any binary function

g function

Any unary function

a Any

Any value

Returns:
Type
Any