ML Exception Tricks

Is it possible to catch all possible exceptions in ML? for example, if I don’t know what exception might be

+5
source share
1 answer

The operator handleallows you to create pattern matching exceptions, so you can use something like handle _to match something, for example.

hd [] handle _ => 0
+10
source

All Articles