Hoogle Search
Within LTS Haskell 24.64 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
void :: Functor f => f a -> f ()streaming Streaming void value discards or ignores the result of evaluation, such as the return value of an IO action.
Examples
Replace the contents of a Maybe Int with unit:>>> void Nothing Nothing
>>> void (Just 3) Just ()
Replace the contents of an Either Int Int with unit, resulting in an Either Int ():>>> void (Left 8675309) Left 8675309
>>> void (Right 8675309) Right ()
Replace every element of a list with unit:>>> void [1,2,3] [(),(),()]
Replace the second element of a pair with unit:>>> void (1,2) (1,())
Discard the result of an IO action:>>> mapM print [1,2] 1 2 [(),()]
>>> void $ mapM print [1,2] 1 2
-
streaming Streaming.Prelude slidingWindow accumulates the first n elements of a stream, update thereafter to form a sliding window of length n. It follows the behavior of the slidingWindow function in conduit-combinators.
>>> S.print $ S.slidingWindow 4 $ S.each "123456" fromList "1234" fromList "2345" fromList "3456"
-
streaming Streaming.Prelude slidingWindowMax finds the maximum in every sliding window of n elements of a stream. If within a window there are multiple elements that are the largest, it prefers the last occurrence (if you prefer to have the first occurrence, use the min version and flip your comparator). It satisfies:
slidingWindowMax n s = map maximum (slidingWindow n s)
Except that it is far more efficient, especially when the window size is large: it calls compare O(m) times overall where m is the total number of elements in the stream. -
streaming Streaming.Prelude slidingWindowMaxBy finds the maximum in every sliding window of n elements of a stream according to the given comparison function (which should define a total ordering). See notes above about elements that are equal. It satisfies:
slidingWindowMaxBy f n s = map (maximumBy f) (slidingWindow n s)
Except that it is far more efficient, especially when the window size is large: it calls the comparison function O(m) times overall where m is the total number of elements in the stream. -
streaming Streaming.Prelude slidingWindowMaxOn finds the maximum in every sliding window of n elements of a stream according to the given projection function. See notes above about elements that are equal. It satisfies:
slidingWindowMaxOn f n s = map (maximumOn (comparing f)) (slidingWindow n s)
Except that it is far more efficient, especially when the window size is large: it calls compare on the projected value O(m) times overall where m is the total number of elements in the stream, and it calls the projection function exactly m times. -
streaming Streaming.Prelude slidingWindowMin finds the minimum in every sliding window of n elements of a stream. If within a window there are multiple elements that are the least, it prefers the first occurrence (if you prefer to have the last occurrence, use the max version and flip your comparator). It satisfies:
slidingWindowMin n s = map minimum (slidingWindow n s)
Except that it is far more efficient, especially when the window size is large: it calls compare O(m) times overall where m is the total number of elements in the stream. -
streaming Streaming.Prelude slidingWindowMinBy finds the minimum in every sliding window of n elements of a stream according to the given comparison function (which should define a total ordering). See notes above about elements that are equal. It satisfies:
slidingWindowMinBy f n s = map (minimumBy f) (slidingWindow n s)
Except that it is far more efficient, especially when the window size is large: it calls the comparison function O(m) times overall where m is the total number of elements in the stream. -
streaming Streaming.Prelude slidingWindowMinOn finds the minimum in every sliding window of n elements of a stream according to the given projection function. See notes above about elements that are equal. It satisfies:
slidingWindowMinOn f n s = map (minimumOn (comparing f)) (slidingWindow n s)
Except that it is far more efficient, especially when the window size is large: it calls compare on the projected value O(m) times overall where m is the total number of elements in the stream, and it calls the projection function exactly m times. validateEntry :: UTCTime -> CacheEntry body -> Maybe (Response body)wreq Network.Wreq.Cache No documentation available.
-
basement Basement.Compat.Base The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following:
- Right identity x <> mempty = x
- Left identity mempty <> x = x
- Associativity x <> (y <> z) = (x <> y) <> z (Semigroup law)
- Concatenation mconcat = foldr (<>) mempty
- Unit mconcat (pure x) = x
- Multiplication mconcat (join xss) = mconcat (fmap mconcat xss)
- Subclass mconcat (toList xs) = sconcat xs