Let

public struct Let: Fn

Let binds values to one or more variables. Variable values cannot refer to other variables defined in the same let expression. Variables are lexically scoped to the expression passed via in.

Reference.

  • Declaration

    Swift

    public init(bindings: [(String, Expr?)], in: Expr)

    Parameters

    bindings

    Each array item is a tuple containing the variable name and its corresponding value.

    expr

    Lambda expression where binding variables are available to use.

  • Declaration

    Swift

    public init(bindings: (String, Expr?)..., in: () -> Expr)

    Parameters

    bindings

    Each tuple contains the variable name and its corresponding value.

    expr

    Lambda expression where binding variables are available to use.

  • Declaration

    Swift

    public init(_ e1: Expr, in: (Expr) -> Expr)

    Parameters

    e1

    1st value.

    in

    Lambda expression as a Swift closure.

  • Declaration

    Swift

    public init(_ e1: Expr, _ e2: Expr, in: (Expr, Expr) -> Expr)

    Parameters

    e1

    1st value.

    e2

    2nd value.

    in

    Lambda expression as a swift closure.

  • Declaration

    Swift

    public init(_ e1: Expr, _ e2: Expr, _ e3: Expr, in: (Expr, Expr, Expr) -> Expr)

    Parameters

    e1

    1st value.

    e2

    2nd value.

    e3

    3rd value.

    in

    Lambda expression as a swift closure.

  • Declaration

    Swift

    public init(_ e1: Expr, _ e2: Expr, _ e3: Expr, _ e4: Expr, in: (Expr, Expr, Expr, Expr) -> Expr)

    Parameters

    e1

    1st value.

    e2

    2nd value.

    e3

    3rd value.

    e4

    4th value.

    in

    Lambda expression as a swift closure.

  • Declaration

    Swift

    public init(_ e1: Expr, _ e2: Expr, _ e3: Expr, _ e4: Expr, _ e5: Expr, in: (Expr, Expr, Expr, Expr, Expr) -> Expr)

    Parameters

    e1

    1st value.

    e2

    2nd value.

    e3

    3rd value.

    e4

    4th value.

    e5

    5th value.

    in

    Lambda expression as a swift closure.