Hint 1:
Compare the result of your ziprev
with
List.zip [1,2,3,4] [10,20,30,40]
You should see a fairly obvious pattern.
Hint 2:
List.rev
reverses a list.
Hint 3:
Can you use zipW
to implement List.zip
?
That is, if you want to say
normalzip xs ys = zipW something xs ys
what would something
be?
solved SML functional programming higher order function?