Skip to content
This repository was archived by the owner on Nov 21, 2023. It is now read-only.
This repository was archived by the owner on Nov 21, 2023. It is now read-only.

for ... in syntax #60

Open
Open

Description

@vincentdchan

The 0.5.6 has implemented the iterator.

public interface Iterator<T> {

    next(): Option<T>;

}

public interface Iteratable<T> {

    getIterator(): Iterator<T>;

}

Iterable:

Object extends Iteratable can be used in for ... in:

The internal iterable object:

  • String
  • Array
  • Map

Syntax:

for item in [1,2,3] {
  print(item);
}

Roadmap:

  • Parser
  • Typecheck
  • Transform
  • Stdlib support

Activity

  1. added
    enhancement
    on Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions