From 6b88cd0d42cac8059cb4ead691d20c21ed445a12 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Fri, 31 Jul 2020 20:27:58 +0200 Subject: [PATCH] Revert "Small typo (#15132)" (#15134) This reverts commit 4bf8d38248f40cc0bf5323843a9ea38c5bcc20a8. --- lib/pure/sugar.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pure/sugar.nim b/lib/pure/sugar.nim index 3d9a9d42e5..d2bdb0fdca 100644 --- a/lib/pure/sugar.nim +++ b/lib/pure/sugar.nim @@ -201,7 +201,7 @@ macro capture*(locals: varargs[typed], body: untyped): untyped {.since: (1, 1).} ## for j in 7..9: ## if i * j == 42: ## capture i, j: - ## myClosure = proc () = echo fmt"{i} * {j} == 42" + ## myClosure = proc () = echo fmt"{i} * {j} = 42" ## myClosure() # output: 6 * 7 == 42 ## 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)))