How to apply a function to a list in the racket?
Asked
Active
Viewed 58 times
1 Answers
1
[This answer belonged to v1 of the question which was quite different: it makes limited sense now.]
To transform a list in this way using a function f
- map a function over the list which
- if the element is a list, transforms it with the function
f
- otherwise calls
f
on the element.
- if the element is a list, transforms it with the function