tseqofconcept.nim 228 B

1234567891011121314151617181920
  1. discard """
  2. output: "1\n2\n3"
  3. """
  4. type
  5. MyConcept = concept x
  6. someProc(x)
  7. SomeSeq = seq[MyConcept]
  8. proc someProc(x:int) = echo x
  9. proc work (s: SomeSeq) =
  10. for item in s:
  11. someProc item
  12. var s = @[1, 2, 3]
  13. work s