Hoogle Search
Within LTS Haskell 24.6 (ghc-9.10.2)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
last1Of :: Getting (Last a) s a -> s -> alens Control.Lens.Fold Retrieve the Last entry of a Fold1 or Traversal1 or retrieve the result from a Getter or Lens.o
>>> last1Of traverse1 (1 :| [2..10]) 10
>>> last1Of both1 (1,2) 2
last1Of :: Getter s a -> s -> Maybe a last1Of :: Fold1 s a -> s -> Maybe a last1Of :: Lens' s a -> s -> Maybe a last1Of :: Iso' s a -> s -> Maybe a last1Of :: Traversal1' s a -> s -> Maybe a
lastOf :: Getting (Rightmost a) s a -> s -> Maybe alens Control.Lens.Fold Retrieve the Last entry of a Fold or Traversal or retrieve Just the result from a Getter or Lens. The answer is computed in a manner that leaks space less than ala Last . foldMapOf and gives you back access to the outermost Just constructor more quickly, but may have worse constant factors.
>>> lastOf traverse [1..10] Just 10
>>> lastOf both (1,2) Just 2
>>> lastOf ignored () Nothing
lastOf :: Getter s a -> s -> Maybe a lastOf :: Fold s a -> s -> Maybe a lastOf :: Lens' s a -> s -> Maybe a lastOf :: Iso' s a -> s -> Maybe a lastOf :: Traversal' s a -> s -> Maybe a
last1 :: forall (t :: Type -> Type) a . Traversable1 t => Lens' (t a) alens Control.Lens.Lens A Lens focusing on the last element of a Traversable1 container.
>>> 2 :| [3, 4] & last1 +~ 10 2 :| [3,14]
>>> Node 'a' [Node 'b' [], Node 'c' []] ^. last1 'c'
lastC :: forall (m :: Type -> Type) a o . Monad m => ConduitT a o m (Maybe a)conduit Conduit Retrieve the last value in the stream, if present.
-
conduit Conduit Retrieve the last element in the chunked stream, if present.
lastDefC :: forall (m :: Type -> Type) a o . Monad m => a -> ConduitT a o m aconduit Conduit Same as lastC, but returns a default value if none are available from the stream.
lastDef :: forall (m :: Type -> Type) a o . Monad m => a -> ConduitT a o m aconduit Data.Conduit.Combinators Same as last, but returns a default value if none are available from the stream.
-
conduit Data.Conduit.Combinators Retrieve the last element in the chunked stream, if present. Subject to fusion
-
conduit Data.Conduit.Combinators.Stream No documentation available.
lastS :: forall (m :: Type -> Type) a . Monad m => StreamConsumer a m (Maybe a)conduit Data.Conduit.Combinators.Stream No documentation available.