Skip to content

Expressions as inputs #16

@atticoos

Description

@atticoos

The proposal and its examples show static usage

a = [1, 2, 3, 4]
a[1:3]
// → [2, 4]

Eventually the question will be raised if access can be done dynamically by an expression:

Whether it's by variables

i = 1
j = 3

a[i:j]
// → [2, 4]

Or with operators

i = 2
j = 2
a[--i:++j]
// → [2, 4]

Or other expressions

i = () => 1
j = () => 3
a[i():j()]
// → [2, 4]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions