Anonymous user
Multiple distinct objects: Difference between revisions
m
→{{header|OCaml}}
(added ocaml) |
|||
Line 172:
Incorrect:
<code ocaml>
Array.make n (new foo);; (* here (new foo) can be any expression that returns a new object, record, array, or
</code>
which is incorrect since <tt>new foo</tt> is only evaluated once. A correct version is:
|