I'm looking at a compiler written for a extremely pared down version of C. I'm new to ocaml, and am particularly confused about this structure
let check (globals, functions) =
(* A bunch of stuff abstracted out *)
let check_function ...
.... (*A b bunch of stuff abstracted out*)
in (globals, List.map check_function functions)
Where globals is a list of (var_type, var_name) and functions is a function records. I didn't post the entire file (it's very long) and my question is just about the outermost let statement.
I've always only seen simple let statements where you might have something like
let name = expr1 in expr2
So what does it mean when you have
let name(param1, param2) = expr1 in (param1, expr1 param2)
Kind of similar to what I have here?