lens-4.13.2: Lenses, Folds and Traversals

Copyright(C) 2014-2016 Edward Kmett and Eric Mertens
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityprovisional
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell98

Control.Lens.Internal.List

Description

This module provides utility functions on lists used by the library implementation.

Synopsis

Documentation

ordinalNub Source

Arguments

:: Int

strict upper bound

-> [Int]

ordinals

-> [Int]

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

>>> ordinalNub 3 [-1,2,1,4,2,3]
[2,1]