Multiple distinct objects: Difference between revisions

Latitude language added
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(Latitude language added)
Line 735:
4
</pre>
 
=={{header|Latitude}}==
 
We construct an array of the appropriate length and then replace each element with a new object.
 
<lang latitude>arr := n times to (Array) map { Object clone. }.</lang>
 
We can verify that these are in fact distinct objects by checking their ID.
 
<lang latitude>;; Will print 10 distinct, arbitrary numbers.
arr visit {
Kernel id printObject.
}.</lang>
 
=={{header|Logtalk}}==
37

edits