can : ('a -> 'b) -> 'a -> bool

SYNOPSIS
Tests for failure.

DESCRIBE
can f x evaluates to true if the application of f to x succeeds. It evaluates to false if the application fails.

FAILURE

Only fails if f x raises the Interrupt exception.

EXAMPLE
    - hd [];
    ! Uncaught exception: 
    ! Empty

    - can hd [];
    > val it = false : bool

    - can (fn _ => raise Interrupt) 3;
    > Interrupted.

SEEALSO  Lib,   assert,   try,   trye,   partial,   total,   with_exn,   assert_exn

HOL  Kananaskis 0