mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
16 lines
261 B
Nim
16 lines
261 B
Nim
# bug #2073
|
|
|
|
import sequtils
|
|
import times
|
|
|
|
# 1
|
|
proc f(n: int): TimeInfo =
|
|
TimeInfo(year: n, month: mJan, monthday: 1)
|
|
|
|
echo toSeq(2000 || 2015).map(f)
|
|
|
|
# 2
|
|
echo toSeq(2000 || 2015).map(proc (n: int): TimeInfo =
|
|
TimeInfo(year: n, month: mJan, monthday: 1)
|
|
)
|