def last
import bend-collections-laws-crypto@1.0.0.0/spec/lib/common.bend as Commonimport Base
97def last(-A: Data, xs: List<&2, A>) -> Maybe<&2, A>:
98 match xs:
99 case Nil{}:
100 None{}
101 case Con{h, t}:
102 match t:
103 case Nil{}:
104 Some{h}
105 case Con{h2, t2}:
106 last(A, Con{h2, t2})