Int ܕͷΛड͚औΓ Int -> Int ܕͷΛฦ͢ add 3 :: Int -> Int (add 3) y = 3 + y -- `add 3` ʮ3 Λؔ͢ʯͰ͋Δ • Int -> Int ؔͷܕͰ͋Γɺ ͷର • add ର Int ͔Β Int -> Int ͷ ͷࣹ
-> Maybe b) fmap f :: Maybe a -> Maybe b fmap f (Just x) = Just (f x) fmap f Nothing = Nothing • f :: a -> b Λ fmap f :: Maybe a -> Maybe b ʹ • ͭ·Γɺ ͷࣹΛ ͷࣹʹ͏ͭ͢ • ͕ͨͬͯ͠ɺMaybe ͔Β ͷؔख