t2procs.nim 251 B

12345678910111213141516171819
  1. discard """
  2. output: '''before
  3. 1
  4. before
  5. 2'''
  6. """
  7. proc fn[T1, T2](a: T1, b: T2) =
  8. a(1)
  9. b(2)
  10. fn( (proc(x: int) =
  11. echo "before" # example block, can span multiple lines
  12. echo x),
  13. (proc (y: int) =
  14. echo "before"
  15. echo y)
  16. )