def snoc

bend-collections-laws-math@1.0.0.0 · spec/lib/common.bend:90

import bend-collections-laws-math@1.0.0.0/spec/lib/common.bend as Common
import Base

90def snoc(-A: Data, xs: List<&2, A>, x: A) -> List<&2, A>:
91  match xs:
92    case Nil{}:
93      Con{x, Nil{}}
94    case Con{h, t}:
95      Con{h, snoc(A, t, x)}

Uses (1)

Used by (12)