* -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 ]
Differentiable logging multiplication function.

Examples of usage

>>> import Control.Arrow (runKleisli)

>>> import Control.Monad.Logger (runStdoutLoggingT)

>>> import InfBackprop (call)
>>> runStdoutLoggingT $ runKleisli (call (*)) (6, 7)
[Info] Calculating multiplication of 6 and 7 => 42
42
Product binnary operation

Examples of usage

>>> import Prelude (Float)

>>> import InfBackprop (call, derivative)

>>> call (*) (2, 3) :: Float
6.0
>>> import Debug.SimpleExpr.Expr (variable)

>>> x = variable "x"

>>> y = variable "y"

>>> derivative (*) (x, y)
(1·y,1·x)
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.