def unique.distinct

bend-kit-json@0.7.0.0 · json.bend:779

import bend-kit-json@0.7.0.0/json.bend as Json
import Base

779# xs is sorted and prev <= each of xs, so prev equals x when x <= prev.
780def unique.distinct(xs: List<&2, List<&2, U32>>, +prev: List<&2, U32>) -> Bool:
781  match xs:
782    case Nil{}:
783      True{}
784    case +x <> t:
785      Bool.and(Bool.not(unique.le(x, prev)), unique.distinct(t, x))

Uses (6)

Used by (1)