Skip to content

Class: ListComprehension ​

ListComprehension when the for expression is a yield. Scala's for comprehensions, Erlang's and Haskell's list comprehensions

Example ​

ts
m = [ f x | x <- [1, 2, 3, 4] ]

Constructors ​

Constructor ​

new ListComprehension(projection, generators, loc?): ListComprehension

Parameters ​

ParameterType
projectionExpression
generators(Generator | Expression)[]
loc?SourceLocation

Returns ​

ListComprehension

Overrides ​

ASTNode.constructor