It seems like flip is doing unexpected things to my functions
Example 1:
let m = flip max
:t max
max :: Ord a => a -> a ->
:t m
m :: () -> () -> ()
Example 2:
let f x y = x + y
:t f
f :: Num a => a -> a -> a
let g = flip f
:t g
g :: Integer -> Integer -> Integer
f
can evaluate floating point numbers, but g
throws an error when it sees floats. But when I run
(flip f) 1.5 1.7
This evaluates fine! What is the difference between these expressions?