- -package:dimensional

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
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))
Remove the current extension and add another, equivalent to replaceExtension.
"/directory/path.txt" -<.> "ext" == "/directory/path.ext"
"/directory/path.txt" -<.> ".ext" == "/directory/path.ext"
"foo.o" -<.> "c" == "foo.c"
Remove the current extension and add another, equivalent to replaceExtension.
"/directory/path.txt" -<.> "ext" == "/directory/path.ext"
"/directory/path.txt" -<.> ".ext" == "/directory/path.ext"
"foo.o" -<.> "c" == "foo.c"
Remove the current extension and add another, equivalent to replaceExtension.
"/directory/path.txt" -<.> "ext" == "/directory/path.ext"
"/directory/path.txt" -<.> ".ext" == "/directory/path.ext"
"foo.o" -<.> "c" == "foo.c"
Remove the current extension and add another, equivalent to replaceExtension.
"/directory/path.txt" -<.> "ext" == "/directory/path.ext"
"/directory/path.txt" -<.> ".ext" == "/directory/path.ext"
"foo.o" -<.> "c" == "foo.c"
Remove the current extension and add another, equivalent to replaceExtension.
"/directory/path.txt" -<.> "ext" == "/directory/path.ext"
"/directory/path.txt" -<.> ".ext" == "/directory/path.ext"
"foo.o" -<.> "c" == "foo.c"
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