Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. type
  2. Container[T] = concept c
  3. c.len is Ordinal
  4. items(c) is T
  5. for value in c:
  6. type(value) is T
  7.  
  8. proc foo(x: Container[int]) =
  9. for item in x:
  10. echo item
  11.  
  12. foo(@[1,2,3,4])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement