mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-07 21:43:33 +00:00
16 lines
235 B
Nim
16 lines
235 B
Nim
discard """
|
|
output: '''@[1, 2, 5]'''
|
|
"""
|
|
|
|
import future, sequtils
|
|
|
|
type
|
|
List[T] = ref object
|
|
val: T
|
|
|
|
proc foo[T](l: List[T]): seq[int] =
|
|
@[1,2,3,5].filter(x => x != l.val)
|
|
|
|
when isMainModule:
|
|
echo(foo(List[int](val: 3)))
|