def zip_map

stelliferous@0.0.2.0 · kernel_block.bend:7

import stelliferous@0.0.2.0/kernel_block.bend as KernelBlock
import Base

7# Static product composition also lifts an operation to any pair of elements.
8# Nesting this template gives wider products without another arithmetic kernel.
9def zip_map(~Element: Data,~Context: Data,~combine: Element -> Element -> Context -> Element,
10  left: Twin<Element>,right: Twin<Element>,context: Context) -> Twin<Element>:
11  Twin{left_first,left_second} = left
12  Twin{right_first,right_second} = right
13  +context = context
14  Twin{combine(left_first,right_first,context),combine(left_second,right_second,context)}

Uses (1)

Used by (0)

No other definition uses this definition.