>>> import Prelude (Float) >>> import InfBackprop (call, derivative) >>> call (/) (6, 3) :: Float 2.0
>>> import Debug.SimpleExpr.Expr (variable) >>> x = variable "x" >>> y = variable "y" >>> derivative (/) (x, y) (1·(1/y),1·(-(x)·(1/(y·y))))
m//[((i,i), 0) | i <- [1..n]]is the same matrix, except with the diagonal zeroed. Repeated indices in the association list are handled as for array: Haskell 2010 specifies that the resulting array is undefined (i.e. bottom), but GHC's implementation uses the last association for each index.