Skip to content

_EnumEach interface #424

@HoneyryderChuck

Description

@HoneyryderChuck

https://github.com/ruby/rbs/blob/c64d1f5ba5a4fbc95ffb1d72d783ee39b17d60fe/stdlib/builtin/builtin.rbs already contains an _Each interface, but one where an enumerable can also be returned is missing. These are fairly common btw. Here's a proposal:

interface _Each[out A, out B]
  def each: { (A) -> void } -> B
                | () -> Enumerable[A, void]
end

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