Y
Hacker News
new
|
ask
|
show
|
jobs
by
Per_Bothner
1037 days ago
Or Kawa:
(if (? p::Point obj) (... p:x p:y))
This succeeds if obj matches the pattern p::Point, declaring p to be the value of obj coerced to a Point. This is integrated with Kawa's static type-checking/inference.
https://www.gnu.org/software/kawa/Conditionals.html