I'm trying to create a function myMap
that applies x
to a list of functions using map
.
Example:
myMap [f1, f2, ..., fn] x
==> [f1(x), f2(x), ..., fn(x)]
I believe I need to write an anonymous function to complete this task, but am having trouble comprehending how they work.
My Attempt:
fun myMap [x] y = [fn => x ] => x;