def node

bendtorch-core@0.1.0.0 · src/tensor/parallel.bend:24

import bendtorch-core@0.1.0.0/src/tensor/parallel.bend as Parallel
import Base

24# The two components of the state go to `rec` one by one, so a closure
25# call never boxes the state.
26def node(~A: Type, ~B: Type, rec: A -> B -> Array<F32> & (A & B), low: Array<F32> & (A & B)) -> Array<F32> & (A & B):
27  (a, state) = low
28  (l, r) = state
29  join(~(A & B), a, rec(l, r))

Uses (5)

Used by (12)