* -package:dimensional

Multiplication of type-level naturals.
Multiply a scalar by a vector.
Infix shorthand for times.
Multiplication of 2 elements that result in another element
Multiplication
Multiplication
Overloaded multiplication.
Forms the product of ExactPi' types (in the arithmetic sense).
TypeInt multiplication.
The product of two type-level numbers. Due to changes in GHC 8.6, using this operator infix and unqualified requires the NoStarIsType language extension to be active. See the GHC 8.6.x migration guide for details: https://ghc.haskell.org/trac/ghc/wiki/Migration/8.6
  • mul function is used to multiply the states with a constant.
>>> qZero * 5
(2><1)
[ 5.0 :+ 0.0, 0.0 :+ 0.0
, 0.0 :+ 0.0, 0.0 :+ 0.0 ]
Sequence actions, discarding the value of the first argument.

Examples

If used in conjunction with the Applicative instance for Maybe, you can chain Maybe computations, with a possible "early return" in case of Nothing.
>>> Just 2 *> Just 3
Just 3
>>> Nothing *> Just 3
Nothing
Of course a more interesting use case would be to have effectful computations instead of just returning pure values.
>>> import Data.Char

>>> import GHC.Internal.Text.ParserCombinators.ReadP

>>> let p = string "my name is " *> munch1 isAlpha <* eof

>>> readP_to_S p "my name is Simon"
[("Simon","")]
Split the input between the two argument arrows and combine their output. Note that this is in general not a functor. The default definition may be overridden with a more efficient version if desired.
b ╭─────╮ b'
>───┼─ f ─┼───>
>───┼─ g ─┼───>
c ╰─────╯ c'
Low word of signed integer multiply.
Exponentiation.
Raise the target(s) of a numerically valued Lens, Setter or Traversal to an arbitrary power
>>> execState (do _1 **= c; _2 **= d) (a,b)
(a**c,b**d)
(**=) ::  (MonadState s m, Floating a) => Setter' s a    -> a -> m ()
(**=) ::  (MonadState s m, Floating a) => Iso' s a       -> a -> m ()
(**=) ::  (MonadState s m, Floating a) => Lens' s a      -> a -> m ()
(**=) ::  (MonadState s m, Floating a) => Traversal' s a -> a -> m ()