Skip to content

Module closures #16

@foxfriends

Description

@foxfriends

Would it be too much to make module closures too? Then modules/types/classes really do all become one thing, and it all kind of makes sense...

proc main!() {
  let collector = mod {
    proc empty!() { return [] }
    func append x y = [x]
    func of x = [x]
  }

  iter::collect collector (iter::of [1, 2, 3])
}

Probably decide if type and ty is the better choice than module and mod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions