Skip to content

v0.6.34

Compare
Choose a tag to compare
@github-actions github-actions released this 04 Apr 14:37
· 357 commits to main since this release

Breaking changes

  • Array has been renamed to List.

other changes

  • map, filter, ... are now Iterable methods.
assert [1, 2, 3].map(i -> i + 1).filter(i -> i >= 3).to_list() == [3, 4]
  • Now, hasattr can narrow types.
C = Class { .foo = Int; .bar = Str }
D = Class { .baz = Str }
bar x: C or D =
    if hasattr(x, "foo"):
        do: x.bar
        do: "?"
assert bar(C.new { .foo = 1; .bar = "bar" }) == "bar"