tsidee3.nim 270 B

1234567891011121314
  1. discard """
  2. output: "5"
  3. """
  4. var
  5. global: int
  6. proc dontcare(x: int): int {.noSideEffect.} = return x
  7. proc noSideEffect(x, y: int, p: proc (a: int): int {.noSideEffect.}): int {.noSideEffect.} =
  8. return x + y + dontcare(x)
  9. echo noSideEffect(1, 3, dontcare) #OUT 5