tdeques.nim 241 B

123456789101112131415161718
  1. discard """
  2. output: '''true'''
  3. """
  4. import deques
  5. proc index(self: Deque[int], idx: Natural): int =
  6. self[idx]
  7. proc main =
  8. var testDeque = initDeque[int]()
  9. testDeque.addFirst(1)
  10. assert testDeque.index(0) == 1
  11. main()
  12. echo "true"