HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduledeque-0.4.4.1Haskell2010

Deque.Strict.Reader

Strict Deque API lifted to a Reader monad, "mtl"-style.

  • 22 values
  • Packagedeque-0.4.4.1
  • Exports22
  • LanguageHaskell2010
  • LicenceMIT
  • SourceReader.hs
valueuncons :: MonadReader (Deque a) m => m (Maybe a, Deque a)
#

\mathcal{O}(1), occasionally \mathcal{O}(n). Get the first element and deque without it if it's not empty.

valueunsnoc :: MonadReader (Deque a) m => m (Maybe a, Deque a)
#

\mathcal{O}(1), occasionally \mathcal{O}(n). Get the last element and deque without it if it's not empty.

valuehead :: MonadReader (Deque a) m => m (Maybe a)
#

\mathcal{O}(1), occasionally \mathcal{O}(n). Get the first element if deque is not empty.

valuelast :: MonadReader (Deque a) m => m (Maybe a)
#

\mathcal{O}(1), occasionally \mathcal{O}(n). Get the last element if deque is not empty.

valuetail :: MonadReader (Deque a) m => m (Deque a)
#

\mathcal{O}(1), occasionally \mathcal{O}(n). Keep all elements but the first one.

valueinit :: MonadReader (Deque a) m => m (Deque a)
#

\mathcal{O}(1), occasionally \mathcal{O}(n). Keep all elements but the last one.