Seq.purs 281 Bytes
Newer Older
1
module Gargantext.Utils.Seq (mapMaybe) where
2

3 4
import Data.Maybe (Maybe, maybe)
import Data.Sequence (Seq, concatMap, empty, singleton)
5

6
import Gargantext.Prelude ((<<<))
7 8

mapMaybe :: forall a b. (a -> Maybe b) -> Seq a -> Seq b
9
mapMaybe f = concatMap (maybe empty singleton <<< f)