List comprehensions: Difference between revisions

Added Arturo implementation
(→‎{{header|Picat}}: Split into subsections.)
(Added Arturo implementation)
Line 276:
{{Out}}
<lang AppleScript>{{3, 4, 5}, {5, 12, 13}, {6, 8, 10}, {7, 24, 25}, {8, 15, 17}, {9, 12, 15}, {12, 16, 20}, {15, 20, 25}}</lang>
 
=={{header|Arturo}}==
 
<lang rebol>n: 20
triplets: @[
loop 1..n 'x [
loop x..n 'y [
loop y..n 'z [if (z^2) = (x^2)+(y^2) -> @[x y z]]
]
]
]
print triplets</lang>
 
{{out}}
 
<pre>[3 4 5] [5 12 13] [6 8 10] [8 15 17] [9 12 15] [12 16 20]</pre>
 
=={{header|AutoHotkey}}==
1,532

edits