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]
>>> fmap (++ "World") (Const "Hello") Const "Hello"Because we ignore the second type parameter to Const, the Applicative instance, which has (<*>) :: Monoid m => Const m (a -> b) -> Const m a -> Const m b essentially turns into Monoid m => m -> m -> m, which is (<>)
>>> Const [1, 2, 3] <*> Const [4, 5, 6] Const [1,2,3,4,5,6]