-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Well done with reduce!! (high five)
The next exercise is simpler. It builds on the previous one.
Reduce provides the conceptual foundation for all recursive list computation. Your next few tasks will be to set about proving this. I've heard people say that anything can be computed with reduce. I think this is hyperbolic but still, it's a strong endorsement.
First up: implement myMap using only a single call to myReduce. Your whole function body can only be return myReduce(_______); It's all about the parameters you pass in.
Unfortunately I think you will need to use an array method. Just be sure that whatever you use is non-destructive. We're still not allowed to mutate state.
Metadata
Metadata
Assignees
Labels
No labels