When either of the two forms can be used, fun is generally preferred due to its compactness. See also OCaml documentation on Functions.