(b → c) → (a → b) → a → cimport qualified Data.Char as Ch (ord) main :: IO () main = do print $ f3 'a' print $ f4 'a' f1 :: Char -> Integer f1 ch = toInteger $ Ch.ord(ch) f2 :: Integer -> Double f2 n = fromIntegral n :: Double f3 :: Char -> Double f3 = f2 . f1 f4 :: Char -> Double f4 ch = f2 (f1 ch)
97.0 97.0