summary refs log tree commit diff stats
path: root/tests/openarray/t6163.nim
blob: 0e9d4e0e43cad65c7002418c22f04edfbc927443 (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 sugar 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