def from_list
import bend-lawful-stdlib@0.1.0.0/src/vec.bend as Vecimport Base
23# a list as a Vec of its own length
24def from_list(-A: Data, xs: List<&2, A>) -> Vec(A, List.length(&2, A, xs)):
25 match xs:
26 case Nil{}:
27 Unit{}
28 case h <> t:
29 (h, from_list(A, t))
Uses (5)
Used by (0)
No other definition uses this definition.