First-class functionwikiIn computer science, a programming language is said to have first-class functions if it treats functions as first-class citizens. This means the language supports passing functions as arguments to other functions, returning them as the values from other functions, and assigning them to variables or storing them in data structures. Some programming language theorists require support for anonymous functions (function literals) as well. In languages with first-class functions, the names of functions do not have any special status; they are treated like ordinary variables with a function type.
This post continues the article “Declarative development in Caché”.
[2, 3, 5, 7, 11, 13, 17].forEach(function(i) { console.log(i); });
How to do something like this in Caché using COS?
Below are some exercises on this topic.