================================================================================
lambdas/lambda2
================================================================================

x = 2

local addX = (y) -> y + x

res1 = addX.apply(3)

local a {
  b = 2
  c {
    mulB = (x) -> x * b
  }
}

res2 = a.c.mulB.apply(3)

--------------------------------------------------------------------------------

(module
  (classProperty
    (identifier)
    (intLiteral))
  (classProperty
    (modifier)
    (identifier)
    (functionLiteral
      (parameterList
        (typedIdentifier
          (identifier)))
      (binaryExpr
        (variableExpr
          (identifier))
        (variableExpr
          (identifier)))))
  (classProperty
    (identifier)
    (methodCallExpr
      (variableExpr
        (identifier))
      (identifier)
      (argumentList
        (intLiteral))))
  (classProperty
    (modifier)
    (identifier)
    (objectBody
      (objectProperty
        (identifier)
        (intLiteral))
      (objectProperty
        (identifier)
        (objectBody
          (objectProperty
            (identifier)
            (functionLiteral
              (parameterList
                (typedIdentifier
                  (identifier)))
              (binaryExpr
                (variableExpr
                  (identifier))
                (variableExpr
                  (identifier)))))))))
  (classProperty
    (identifier)
    (methodCallExpr
      (propertyCallExpr
        (propertyCallExpr
          (variableExpr
            (identifier))
          (identifier))
        (identifier))
      (identifier)
      (argumentList
        (intLiteral)))))
