what would be the initial values
let gen_xy vals comp o =
List.fold_left ( fun a ( x, y ) -> comp ( fst a ) x, comp ( snd a ) y ) o vals
let max_xy vals = gen_xy vals max ( min_int, min_int )
What would be the initial value assigned to min_int at the ti开发者_开发技巧me when
max_xy [ (1,2);(3,4) ]
is entered at the #prompt?
Thanks for any input
min_int
is a global constant, whose value is system dependent. On a 64 bit system (with a 64 bit version of ocaml to go with it), it will be -4611686018427387904.
Note that the value of min_int
will not change during the run of your program, so talking about min_int
's "initial value" is a bit misleading.
精彩评论