I was reading about curried function somewhere, which sounded confusing. The example confused me even further. Lets say I have a function:
power :: (Int, Float) -> Float -- computes the nth power of b
power (n, b) =
if n == 0 then 1.0 else b * power (n-1, b)
Now I define another function powerc:: Int -> Float -> Float such that
powerc n b =
if n == 0 then 1.0 else b * powerc (n-1) b
Can someone please explain to me how is powerc a curried version of power function.
Because
powercallows partial application now:BTW,