def decode.step

bendtorch-core@0.1.0.0 · src/shape/LAWS.bend:56

import bendtorch-core@0.1.0.0/src/shape/LAWS.bend as LAWS
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

56def decode.step(-dh: Nat, -dt: List<&2, Nat>, tail: Maybe<&2, Shape.Coordinate(dt)>, head: Maybe<&2, Shape.Fin(dh)>) -> Maybe<&2, Shape.Coordinate(dh <> dt)>:
57  match tail:
58    case None{}:
59      None{}
60    case Some{rest}:
61      match head:
62        case None{}:
63          None{}
64        case Some{index}:
65          Some{Shape.CStep{index, rest}}

Uses (6)

Used by (6)