Tony supports list comprehensions, posing an alternative to recursion and higher-order functions like
map when implementing loops.
Say, we want to add
1 to each number from
A list conprehension in Tony consists of an evaluated expression and a list of generators. A generator represents a variable taking one values in a list. A generator may also include a condition:
A two dimensional list comprehension would look like this: