Functions are objects in Julia. Like any other objects, they can be passed as arguments to other functions. Functions that accept functions are known as higher-order functions.
For instance, we can implement an equivalent of the standard library's foreach function by taking a function f as the firs...