Definitions take on the form: let FUNCTION_NAME ARG1 ARG2 ... = BODY
Newlines and whitespace are ignored by the compiler, so this is valid too:
let
add1
arg
=
arg + 1
Here is the normal version:
let add1 arg = arg + 1
Using ^ to append strings:
let string_append x y = x ^ y
Implement Arithmetic Functions
let plus x y = failwith "For you to implement"let times x y = failwith "For you to implement"let minus x y = failwith "For you to implement"let divide x y = failwith "For you to implement"