I have a question regarding trying to define a recursively defined foldl function in Racket.
Here is my approach:
(define foldl
(lambda (z c xs)
(match xs
(empty z)
((make-pair x xs) (foldl c (c z x) xs)))))
Unfortunately, when I do this, I get the Error:
expected a function after the open parenthesis but received 1
I cannot quite figure out why this message is popping up. Can someone help me?