const x = \_ -> xThis function might seem useless at first glance, but it can be very useful in a higher order context.
>>> const 42 "hello" 42
>>> map (const 42) [0..3] [42,42,42,42]
>>> const 42 "hello" 42
>>> map (const 42) [0..3] [42,42,42,42]
>>> const 42 "hello" 42
>>> map (const 42) [0..3] [42,42,42,42]
>>> map (const 42) [0..3] [42,42,42,42]
>>> const 42 "hello" 42
>>> map (const 42) [0..3] [42,42,42,42]
>>> consT 5 (True,'c') (5,True,'c')
>>> import Control.Arrow (runKleisli) >>> import Control.Monad.Logger (runStdoutLoggingT) >>> import Debug.SimpleExpr.Expr (variable) >>> import InfBackprop (call, derivative)
>>> runStdoutLoggingT $ runKleisli (call (const 42)) () 42
>>> import Prelude (Float) >>> import InfBackprop (call, derivative, derivativeN)
>>> call (const 5) () 5
>>> derivative (const (5 :: Float)) 42 0
>>> derivativeN 2 (const (5 :: Float)) 42 0.0