~/bend-docscommunity

src/vec.bend checks

raw source on the hub · import 0x5f97f469d15c04a181dae0e4e64e1d3d/src/vec.bend as Vec

2 imports
import Base
import ./nat.bend as Nat

Definitions

def Vec source · line 16 · raw

@-A:Data -> @n:Nat -> Data

def from_list source · line 24 · raw

@-A:Data -> @xs:List<&2, A> -> Vec(A, List.length(&2, A, xs))

a list as a Vec of its own length

def get source · line 31 · raw

@-A:Data -> @n:Nat -> @v:Vec(A, n) -> @i:Nat -> @lt:0x5f97f469d15c04a181dae0e4e64e1d3d/src/nat.LT(i, n) -> A

Templates

template zip_with source · line 43 · raw

@-A:Data -> @-B:Data -> @-C:Data -> @-f:(@_:A -> @_:B -> C) -> @n:Nat -> @xs:Vec(A, n) -> @ys:Vec(B, n) -> Vec(C, n)

template foldr source · line 52 · raw

@-A:Data -> @-B:Data -> @-f:(@_:A -> @_:B -> B) -> @n:Nat -> @v:Vec(A, n) -> @z:B -> B