Langton's ant: Difference between revisions

Content added Content deleted
m (→‎{{header|Sidef}}: modified code to work with Sidef 2.10)
(→‎{{header|Nim}}: Compiles with Nim Compiler Version 0.12.1 (include sequtils, annotate Color type of the final 'x'))
Line 3,698: Line 3,698:
=={{header|Nim}}==
=={{header|Nim}}==
{{trans|Python}}
{{trans|Python}}
<lang nim>import strutils
<lang nim>import strutils, sequtils


type
type
Line 3,730: Line 3,730:


for row in m:
for row in m:
echo map(row, proc(x): string =
echo map(row, proc(x: Color): string =
if x == white: "." else: "#").join("")</lang>
if x == white: "." else: "#").join("")</lang>