Skip to content

Allow overloads with async vs sync lambda parameters #433

@BSteffaniak

Description

@BSteffaniak

Similar to #430

public sync forEach(func(Type, Int, List<Type>)) => this {
  var Int i = 0

  for (value in this) {
    func(value, i++, this)
  }
}

public async forEach(async func(Type, Int, List<Type>)) => this {
  var Int i = 0

  for (value in this) {
    func(value, i++, this)
  }
}

where it calls the respective one depending on if the lambda passed to it is async or not

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions