t14227.nim 342 B

123456789101112131415161718192021222324
  1. discard """
  2. action: "compile"
  3. """
  4. import sugar
  5. block:
  6. let y = @[@[1, 2], @[2, 4, 6]]
  7. let x = collect(newSeq):
  8. for i in y:
  9. if i.len > 2:
  10. for j in i:
  11. j
  12. echo(x)
  13. block:
  14. let y = @[@[1, 2], @[2, 4, 6]]
  15. let x = collect(newSeq):
  16. for i in y:
  17. for j in i:
  18. if i.len > 2:
  19. j
  20. echo(x)