Author | Message |
---|---|
lren2
Posts: 5
|
Posted 21:24 Feb 10, 2019 |
Hello, I'm responsible for number 6 and it's been driving me up the walls. So creating a functionPair with foldr seems impossible as foldr takes an argument like this: foldr (some operation, so like a function) (list or number that this operation is gonna do) (other list that its gonna be applied to) In my Haskell code, I'm having trouble implementing foldr because what it does is ACCUMULATES the numbers instead of applying the function to each one. I'm not sure how to split it or is the only way to do this some kind of loop in Haskell? I know it's last moment but any help would be greatly appreciated. |
rabbott
Posts: 1649
|
Posted 21:35 Feb 10, 2019 |
Can you do it with The way to turn a |