fst : ('a * 'b) -> 'a
STRUCTURE
SYNOPSIS
Extracts the first component of a pair.
DESCRIPTION
fst (x,y) returns x.
FAILURE
Never fails. However, notice that fst (x,y,z) fails to typecheck, since (x,y,z) is not a pair.
EXAMPLE
- fst (1, "foo");
> val it = 1 : int

- fst (1, "foo", []);
! Toplevel input:
! fst (1, "foo", []);
!     ^^^^^^^^^^^^^^
! Type clash: expression of type
!   'g * 'h * 'i
! cannot have type
!   'j * 'k
! because the tuple has the wrong number of components

- fst (1, ("foo", []));
> val it = 1 : int

SEEALSO
HOL  Kananaskis-13