module Data.Array.Comfort.Shape.Set where

import qualified Data.Set as Set
import Data.Set (Set)


offset, uncheckedOffset :: Ord a => Set a -> a -> Int
offset = flip Set.findIndex
uncheckedOffset = offset

indexFromOffset, uncheckedIndexFromOffset :: Set a -> Int -> a
indexFromOffset = flip Set.elemAt
uncheckedIndexFromOffset = indexFromOffset