HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduledeque-0.4.4.1Haskell2010

Deque.Lazy.Reader

Lazy 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.