def unique
import bend-kit-router@0.2.0.0/router.bend as Routerimport Base
244def unique(xs: List<&2, String>, prev: String, +acc: List<&2, String>) -> List<&2, String>:
245 match xs:
246 case Nil{}:
247 List.reverse(&2, String, acc)
248 case +h <> t:
249 unique(t, h, Bool.pick(List<&2, String>, String.eq(h, prev), acc, h <> acc))