Hey I'm just revising for my functional programming exam coming up on friday and I'm just working through exercises given by our lecturer. I've come across one which I neep a bit of help on:
6. a) Write a function that zips a given list xs with every list in a list yss of lists. Use partial applications and lambda expressions to the greatest extent possible in defining your function. b) Write a function that zips every list in a list yss of lists with a given list xs. Use partial applications and lambda expressions to the greatest extent possible in defining your function. The difference between your solutions to part a) and part b) of this problem illustrates that partially applied functions must take their arguments in the correct order.
What I have at the moment for (a) is :
zipAll = (\xs (ys:yss) -> [(zip xs ys)] ++ zipAll xs yss)
It's non-exaustive I know but could anyone give me some pointers?