List comprehensions: Difference between revisions

Content deleted Content added
→‎C# Iterator: Removed as it too is not a list comprehension.
No edit summary
Line 993:
((3 4 5) (5 12 13) (6 8 10) (8 15 17) (9 12 15) (12 16 20))
</pre>
 
=={{header|Smalltalk}}==
{{works with|Pharo|1.3-13315}}
<lang smalltalk>
| test |
 
test := [ :a :b :c | a*a+(b*b)=(c*c) ].
 
(1 to: 20)
combinations: 3 atATimeDo: [ :x |
(test valueWithArguments: x)
ifTrue: [ ':-)' logCr: x ] ].
 
"#(3 4 5)
#(5 12 13)
#(6 8 10)
#(8 15 17)
#(9 12 15)
#(12 16 20)"
</lang>
 
=={{header|Tcl}}==