funcynim/chain

Source Edit

The bread and butter of functional programming: function composition.

Procs

func `<<`[A; B; C](left: B -> C; right: A -> B): A -> C

An alias for compose.

Since 1.1.0

Source Edit
func `>>`[A; B; C](left: A -> B; right: B -> C): A -> C

An alias for chain.

Since 1.1.0

Source Edit
func chain[A; B; C](self: A -> B; next: B -> C): A -> C
Source Edit
func compose[A; B; C](self: B -> C; prev: A -> B): A -> C
Since 0.3.0. Source Edit