- -package:filepath

Subtraction of type-level naturals.
Subtract two vectors, or subtract a vector from a point.
Infix shorthand for minus.
Subtract 2 Word128
Subtract 2 Word256
Subtracts one Quantity from another.
Subtracts one possibly scaled SQuantity from another, preserving any scale factor. Use in conjunction with changeRepRound to combine quantities with differing scale factors.
TypeInt subtraction.
The difference of two type-level numbers For the difference of two naturals a and b, a-b is also a natural, so only exists for a >= b.
Subtraction differentiable binary operation.

Examples of usage

>>> import Prelude (Float)

>>> import InfBackprop (call, derivative)
>>> call (-) (5, 3) :: Float
2.0
>>> import Debug.SimpleExpr.Expr (variable)

>>> x = variable "x"

>>> y = variable "y"

>>> derivative (-) (x, y)
(1,-(1))
Modify the target(s) of a Lens', Iso, Setter or Traversal by subtracting a value.
>>> execState (do _1 -= c; _2 -= d) (a,b)
(a - c,b - d)
(-=) :: (MonadState s m, Num a) => Setter' s a    -> a -> m ()
(-=) :: (MonadState s m, Num a) => Iso' s a       -> a -> m ()
(-=) :: (MonadState s m, Num a) => Lens' s a      -> a -> m ()
(-=) :: (MonadState s m, Num a) => Traversal' s a -> a -> m ()
Decrement the target(s) of a numerically valued Lens, Iso, Setter or Traversal.
>>> (a,b) & _1 -~ c
(a - c,b)
>>> (a,b) & both -~ c
(a - c,b - c)
>>> _1 -~ 2 $ (1,2)
(-1,2)
>>> mapped.mapped -~ 1 $ [[4,5],[6,7]]
[[3,4],[5,6]]
(-~) :: Num a => Setter' s a    -> a -> s -> s
(-~) :: Num a => Iso' s a       -> a -> s -> s
(-~) :: Num a => Lens' s a      -> a -> s -> s
(-~) :: Num a => Traversal' s a -> a -> s -> s
Decrement the target(s) of a numerically valued Lens, or Traversal.
>>> (a,b) & _1 -~ c
(a - c,b)
>>> (a,b) & both -~ c
(a - c,b - c)
>>> _1 -~ 2 $ (1,2)
(-1,2)
>>> mapped.mapped -~ 1 $ [[4,5],[6,7]]
[[3,4],[5,6]]
(-~) :: Num a => Lens' s a      -> a -> s -> s
(-~) :: Num a => Traversal' s a -> a -> s -> s
Sequential inverse function composition, for those who read their programs from left to right. The result of the first function is evaluated using the given strategy, and then given to the second function.
Parallel inverse function composition, for those who read their programs from left to right. The result of the first function is evaluated using the given strategy, in parallel with the application of the second function.