summary refs log tree commit diff stats
path: root/tests/openarray/t6163.nim
blob: ec8c3cd0b3a4f7346a5ad86df85960229d58398f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
discard """
  exitcode: 0
  targets: "c cpp js"
  output: '''19316
'''
"""

from future import `->`, `=>`
from math import `^`, sum
from sequtils import filter, map, toSeq

proc f: int =
  toSeq(10..<10_000).filter(a => a == ($a).map(d => (d.ord-'0'.ord).int^4).sum).sum

var a = f()

echo a