Skip to content

ComposeApply ​

The fold behind Compose — applies the head names in steps to subject right to left, each through its own declared head so every intermediate value stays a properly typed carrier.

ComposeApply(steps, subject)apply steps (a list of head names) to subject right to left, one declared head at a time
Typed signatures
TypePackageApplies
(list<any>, any) -> anycombinatoricsalways

Domain: Combinatorial maps

Examples

Basic #

Sort first, then reverse: the steps apply right to left

live ↗
InComposeApply([Reverse,Sort],[3,1,2])\mathrm{ComposeApply}(\bigl\lbrack\mathrm{Reverse}, \mathrm{Sort}\bigr\rbrack, \bigl\lbrack3, 1, 2\bigr\rbrack)Out[3,2,1]\bigl\lbrack3, 2, 1\bigr\rbrack
About
Examples1

See also: Compose