The following is an example schema code (correct me if I am wrong):
(define (translate points delta)
(map
(lambda (x)
(+ x delta)
)
points
)
)
it basically defines a lambda function that it adds deltafor input x, then applies it to each element points.
I found this feature quite interesting that it omits all iterators, etc.
Is it possible to make such a "map" in C ++ in an elegant way?
Update according to answer:
To be more specific, is there a way to implement such a “map” function of a Schema in C ++ so that it can be used elegantly? Maybe a template function called "map" that takes a function pointer / functor and container?