Open Collective
Open Collective
Loading
Typed Clojure 1.0.28: New fn type syntax
Published on May 1, 2022 by Ambrose Bonnaire-Sergeant

Hi,

Typed Clojure 1.0.28 has been released.

Highlights:
- new syntactic sugar for function arguments:

[t/Int :+ :-> Foo] ;; for 1 or more t/Int arguments[t/Int :? :-> Foo] ;; for 0 or 1 t/Int argumentsSee typed.ann.clojure for examples of :+ (41 usages so far)

- support for checking unrolled fn's without having to unroll the type:

ie., check (fn ([a] ...) ([a & bs] ...))  with [t/Int :* :-> Foo]

See the CHANGELOG.md for full details.

Thanks for your support!
Ambrose