I'm trying to wrap my head around functional programming in ruby and there doesn't seem to be much good documentation out there.
Essentially, I'm trying to write a combine function that would have a Haskell type signature of:
[a] -> [a] -> (a -> a -> a) -> [a]
So
combine([1,2,3], [2,3,4], plus_func) => [3,5,7]
combine([1,2,3], [2,3,4], multiply_func) => [2,6,12]
etc.
I found some stuff about using zip and map but that feels really ugly to use.
What would be the most "ruby" way of implementing something like this?