Revert "Small typo (#15132)" (#15134)

This reverts commit 4bf8d38248.
This commit is contained in:
Andreas Rumpf 2020-07-31 20:27:58 +02:00 • committed by GitHub
commit 6b88cd0d42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -201,7 +201,7 @@ macro capture*(locals: varargs[typed], body: untyped): untyped {.since: (1, 1).}
## for j in 7..9: ## for j in 7..9:
## if i * j == 42: ## if i * j == 42:
## capture i, j: ## capture i, j:
## myClosure = proc () = echo fmt"{i} * {j} == 42" ## myClosure = proc () = echo fmt"{i} * {j} = 42"
## myClosure() # output: 6 * 7 == 42 ## myClosure() # output: 6 * 7 == 42
## let m = @[proc (s: string): string = "to " & s, proc (s: string): string = "not to " & s] ## let m = @[proc (s: string): string = "to " & s, proc (s: string): string = "not to " & s]
## var l = m.mapIt(capture(it, proc (s: string): string = it(s))) ## var l = m.mapIt(capture(it, proc (s: string): string = it(s)))