Pythagorean triples: Difference between revisions

Content added Content deleted
m (→‎{{header|Tcl}}: Remove coroutines (and version restriction); not needed any more)
m (→‎{{header|Tcl}}: Note on limit (not very interesting))
Line 883: Line 883:
=={{header|Tcl}}==
=={{header|Tcl}}==
Using the efficient method based off the Wikipedia article:
Using the efficient method based off the Wikipedia article:
<!--There's no technical reason to limit the code to just these values, but generation does get progressively slower with larger maximum perimiters. 10M is about as much as I have patience for; I'm generally impatient! -->
<lang tcl>proc countPythagoreanTriples {limit} {
<lang tcl>proc countPythagoreanTriples {limit} {
lappend q 3 4 5
lappend q 3 4 5