{-# LANGUAGE Safe #-}
module Data.RAList (
RAList (..),
explicitShow,
explicitShowsPrec,
empty,
singleton,
cons,
(!),
(!?),
uncons,
length,
null,
toList,
fromList,
ifoldMap,
adjust,
map,
imap,
itraverse,
) where
import Data.RAList.Internal
import Prelude (Maybe (..))
import qualified Data.RAList.NonEmpty as NE
uncons :: RAList a -> Maybe (a, RAList a)
uncons :: forall a. RAList a -> Maybe (a, RAList a)
uncons RAList a
Empty = Maybe (a, RAList a)
forall a. Maybe a
Nothing
uncons (NonEmpty NERAList a
r) = (a, RAList a) -> Maybe (a, RAList a)
forall a. a -> Maybe a
Just (NERAList a -> (a, RAList a)
forall a. NERAList a -> (a, RAList a)
NE.uncons NERAList a
r)