def when

bend-kit-llm@0.13.0.1 · llm.bend:56

import bend-kit-llm@0.13.0.1/llm.bend as Llm
import Base
import bend-kit-json@0.7.0.0/json.bend as Json
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

56def when(on: Bool, x: Bytes.Bytes & Json.Val, xs: List<&1, Bytes.Bytes & Json.Val>) -> List<&1, Bytes.Bytes & Json.Val>:
57  match on:
58    case True{}:
59      Con{x, xs}
60    case False{}:
61      xs

Uses (5)

Used by (1)