def take
import bend-collections@1.0.0.0/spec/lib/common.bend as Commonimport Base
154def take(-A: Data, xs: List<&2, A>, n: Nat) -> List<&2, A>:
155 match xs n:
156 case Nil{} _:
157 Nil{}
158 case Con{h, t} 0n:
159 Nil{}
160 case Con{h, t} 1n+p:
161 Con{h, take(A, t, p)}
Uses (2)
Used by (0)
No other definition uses this definition.