Hoogle Search

Within LTS Haskell 24.28 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapInput :: forall (m :: Type -> Type) a b . (MonadIO m, MonadMask m) => (a -> Maybe b) -> InputT m a -> InputT m b

    simple-prompt SimplePrompt.Internal

    maybe map input or loop prompt

  2. mapMaybe :: forall b a . (a -> Maybe b) -> Slist a -> Slist b

    slist Slist

    The Maybe version of map which can throw out elements. If appliying the given function returns Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    >>> maybeEven x = if even x then Just x else Nothing
    
    >>> s = cons 1 $ cons 2 $ one 3
    
    >>> mapMaybe maybeEven s
    Slist {sList = [2], sSize = Size 1}
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just s
    Slist {sList = [1,2,3], sSize = Size 3}
    

  3. mapToKeys :: Map k v -> Slist k

    slist Slist

    O(n). Returns a Slist of all keys of the map in the ascending order.

  4. mapToPairs :: Map k v -> Slist (k, v)

    slist Slist

    O(n). Returns a Slist of all key-value pairs of the map in the ascending order of their keys.

  5. mapToVals :: Map k v -> Slist v

    slist Slist

    O(n). Returns a Slist of all values of the map in the ascending order of their keys.

  6. mapToKeys :: Map k v -> Slist k

    slist Slist.Containers

    O(n). Returns a Slist of all keys of the map in the ascending order.

  7. mapToPairs :: Map k v -> Slist (k, v)

    slist Slist.Containers

    O(n). Returns a Slist of all key-value pairs of the map in the ascending order of their keys.

  8. mapToVals :: Map k v -> Slist v

    slist Slist.Containers

    O(n). Returns a Slist of all values of the map in the ascending order of their keys.

  9. mapMaybe :: forall b a . (a -> Maybe b) -> Slist a -> Slist b

    slist Slist.Maybe

    The Maybe version of map which can throw out elements. If appliying the given function returns Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    >>> maybeEven x = if even x then Just x else Nothing
    
    >>> s = cons 1 $ cons 2 $ one 3
    
    >>> mapMaybe maybeEven s
    Slist {sList = [2], sSize = Size 1}
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just s
    Slist {sList = [1,2,3], sSize = Size 3}
    

  10. mapGenerated :: Mapping -> !Pos

    sourcemap SourceMap.Types

    No documentation available.

Page 320 of many | Previous | Next