Hi all,
Thanks for this great resource. I've got a basic question about partial function application:
Let's say I have a very basic function:
volumeFunction length width height = length * width * height
Its type signature is:
volumeFunction :: Int -> Int -> Int -> Int
This implies that I first pass it the length, *then* the width, *then* the height.
So while it is very easy for me to write
volumeWithLengthTen = volumeFunction 10
, it's not possible to create a volumeWithWidthTen or volumeWithHeightTen.
I can see how I might be able to "hack" my way into accessing the "width" argument with infix functions, but there's no way at all that I can see to access the height. This seems arbitrary to me: my volumeFunction doesn't need them in the order they're given. Is there a way around this? Could I somehow combine three smaller functions?
I appreciate any insight.
Tom