optics-extra-0.2: Extra utilities and instances for optics-core
Optics.Extra.Internal.Vector
ordinalNub Source #
Arguments
strict upper bound
ordinals
unique, in-bound ordinals, in order seen
Return the the subset of given ordinals within a given bound and in order of the first occurrence seen.
Bound: 0 <= x < l
0 <= x < l
>>> ordinalNub 3 [-1,2,1,4,2,3] [2,1]
>>>
ordinalNub 3 [-1,2,1,4,2,3]