Multiple distinct objects: Difference between revisions

→‎{{header|Tcl}}: Noted that this requires 8.6
(→‎Tcl: Added implementation)
(→‎{{header|Tcl}}: Noted that this requires 8.6)
Line 267:
c do: [ :e | e printNl ].</lang>
=={{header|Tcl}}==
{{works with|Tcl|8.6}}
(or Tcl 8.5 with the TclOO package already required)
<lang Tcl># Wrong version; only a single object created
set theList [lrepeat $n [Foo new]]
Anonymous user