Tutorial by Examples

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...
Two of the most fundamental higher-order functions included in the standard library are map and filter. These functions are generic and can operate on any iterable. In particular, they are well-suited for computations on arrays. Suppose we have a dataset of schools. Each school teaches a particular...

Page 1 of 1