Typed Clojure 1.0.28: New fn type syntax
Published on May 1, 2022 by Ambrose Bonnaire-Sergeant
Hi,
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]
Thanks for your support!
Ambrose
Ambrose