Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

Nim

Visibility

unlisted

Author

legacy-anonymous

Created

2017-02-20T09:44:35Z

Updated

2017-02-20T09:44:35Z

template withInt(i: int, body: untyped) =
  template plus(a: int): int = i + a
  template minus(a: int): int = i - a
  body


withInt 5:
  echo plus(4)
INFO