Smallest square that begins with n: Difference between revisions

→‎{{header|TXR}}: Terse solution.
(→‎{{header|TXR}}: Use for loop for inner loop; fix regression that caused wrong output in previous few edits.)
(→‎{{header|TXR}}: Terse solution.)
Line 2,458:
48 484
49 49</pre>
 
The following inefficient-but-terse solution produces the same output:
 
<syntaxhighlight lang="txrlisp">(each ((n 1..50))
(flow [mapcar* square 1]
(find-if (opip digits (starts-with (digits n))))
(pic "## ########" n)
put-line))</syntaxhighlight>
 
=={{header|VTL-2}}==
543

edits