List comprehensions: Difference between revisions
Content added Content deleted
(Distinct from map & filter too!) |
|||
Line 4:
Some attributes of a list comprehension are that:
# They should be distinct from (nested) for loops and the use of map & filter functions within the syntax of the language.
# They should return either a list or an iterator (something that returns successive members of a collection, in order).
# The syntax has parts corresponding to that of [[wp:Set-builder_notation|set-builder notation]].
|