Json.unique.distinct: def of bend-kit-json@0.7.0.0 Import: import bend-kit-json@0.7.0.0/json.bend as Json Lines 779-785 of bend-kit-json@0.7.0.0/json.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-json@0.7.0.0/json.bend&start_line=779&end_line=785 import Base # xs is sorted and prev <= each of xs, so prev equals x when x <= prev. def unique.distinct(xs: List<&2, List<&2, U32>>, +prev: List<&2, U32>) -> Bool: match xs: case Nil{}: True{} case +x <> t: Bool.and(Bool.not(unique.le(x, prev)), unique.distinct(t, x)) Uses (6): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-kit-json@0.7.0.0/json.bend&name=unique.le