hey there another haskell question i have a function of type f :: CSP -> Assignment -> Var -> Int -> CSP
i want to write a function with the type
g :: CSP -> Assignment -> Var -> [Int] -> CSP
which applies the original function to all of the elements in the list [Int]
. The CSP
that it is passed should be updated each time f
is applied, the Assigment
will stay the same as will the Var
. I'm pretty sure I need to use a fold but I really don't understand them. I'd really appreciate it if somebody could help me out and maybe try and explain folds.