def List.filter
import Base1063def List.filter(~A: Data, ~f: A -> Bool, xs: List<&2, A>) -> List<&2, A>:
1064 match xs:
1065 case Nil{}:
1066 Nil{}
1067 case +h <> t:
1068 List.filter.put(A, h, List.filter(~A, ~f, t), f(h))
import Base1063def List.filter(~A: Data, ~f: A -> Bool, xs: List<&2, A>) -> List<&2, A>:
1064 match xs:
1065 case Nil{}:
1066 Nil{}
1067 case +h <> t:
1068 List.filter.put(A, h, List.filter(~A, ~f, t), f(h))