I want to create the function Map as described here:
https://en.wikipedia.org/wiki/Map_(higher-order_function)
Map takes a function and a list and returns a list where the function is applied to each element of the list. Here is the definition of Map:
https://notwikilambda.toolforge.org/wiki/ZObject:Z10044
The Implementation be given as:
If(Empty(list), Empty list, Cons(function(Head(list)), Map(function, Tail(list))))
https://notwikilambda.toolforge.org/wiki/ZObject:Z10045
There are several problems with this:
- the UX does not display the first argument of the Cons correctly
- the UX does not allow us to use a function that is an argument as a function call
- the orchestrator seems to not be able to work with recursion (see T286970)
- it is unclear if the orchestrator can use a function as an argument
- we need to use local keys here (see T266241)