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.
(
... ) :: Enum a => a -> Infinite ainfinite-list Data.List.Infinite Generate an infinite progression, starting from a given element, similar to [x..]. For better user experience consider enabling {-# LANGUAGE PostfixOperators #-}:
>>> :set -XPostfixOperators >>> Data.List.Infinite.take 10 (0...) [0,1,2,3,4,5,6,7,8,9]
Beware that for finite types (...) applies cycle atop of [x..]:>>> :set -XPostfixOperators >>> Data.List.Infinite.take 10 (EQ...) [EQ,GT,EQ,GT,EQ,GT,EQ,GT,EQ,GT]
Remember that Int is a finite type as well. One is unlikely to hit this on a 64-bit architecture, but on a 32-bit machine it's fairly possible to traverse ((0 :: Int) ...) far enough to encounter 0 again.(
.... ) :: Enum a => (a, a) -> Infinite ainfinite-list Data.List.Infinite Generate an infinite arithmetic progression, starting from given elements, similar to [x,y..]. For better user experience consider enabling {-# LANGUAGE PostfixOperators #-}:
>>> :set -XPostfixOperators >>> Data.List.Infinite.take 10 ((1,3)....) [1,3,5,7,9,11,13,15,17,19]
Beware that for finite types (....) applies cycle atop of [x,y..]:>>> :set -XPostfixOperators >>> Data.List.Infinite.take 10 ((EQ,GT)....) [EQ,GT,EQ,GT,EQ,GT,EQ,GT,EQ,GT]
Remember that Int is a finite type as well: for a sufficiently large step of progression y - x one may observe ((x :: Int, y)....) cycling back to emit x fairly soon.(
.~ ) :: Setter s t a b -> b -> s -> tlens-family Lens.Family2 Set all referenced fields to the given value.
(
.= ) :: MonadState s m => Setter s s a b -> b -> m ()lens-family Lens.Family2.State.Lazy Set a field of the state.
(
.= ) :: MonadState s m => Setter s s a b -> b -> m ()lens-family Lens.Family2.State.Strict Set a field of the state.
(
... ) :: Index ix => ix -> ix -> Array D ix ixmassiv Data.Massiv.Array Handy synonym for rangeInclusive Seq. Similar to .. for list.
>>> Ix1 4 ... 10 Array D Seq (Sz1 7) [ 4, 5, 6, 7, 8, 9, 10 ]
(
..: ) :: Index ix => ix -> ix -> Array D ix ixmassiv Data.Massiv.Array >>> Ix1 4 ..: 10 Array D Seq (Sz1 6) [ 4, 5, 6, 7, 8, 9 ]
(
.* ) :: (Index ix, Numeric r e) => Array r ix e -> e -> Array r ix emassiv Data.Massiv.Array.Numeric Multiply each element of the array by a scalar value. Scalar is on the right.
Example
>>> let arr = Ix1 20 ..: 25 >>> arr Array D Seq (Sz1 5) [ 20, 21, 22, 23, 24 ] >>> arr .* 10 Array D Seq (Sz1 5) [ 200, 210, 220, 230, 240 ]
-
massiv Data.Massiv.Array.Numeric Apply power to each element of the array where the power value is in the same cell in the second array.
arr1 .** arr2 == zipWith (**) arr1 arr2
- Partial Throws an error when arrays do not have matching sizes
(
.*. ) :: (Index ix, Numeric r e, MonadThrow m) => Array r ix e -> Array r ix e -> m (Array r ix e)massiv Data.Massiv.Array.Numeric Multiply two arrays together pointwise. Same as !*! but produces monadic computation that allows for handling failure. Throws Exception: SizeMismatchException when array sizes do not match.