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

SYNOPSIS
Tests for failure.

DESCRIPTION
can f x evaluates to true if the application of f to x succeeds. It evaluates to false if the application fails with a Failure _ exception.

FAILURE CONDITIONS
Never fails.

EXAMPLE
  # can hd [1;2];;
  val it : bool = true
  # can hd [];;
  val it : bool = false

SEE ALSO
check.