From 4bf8d38248f40cc0bf5323843a9ea38c5bcc20a8 Mon Sep 17 00:00:00 2001 From: Oliver Daniel Date: Fri, 31 Jul 2020 10:35:50 -0400 Subject: [PATCH] Small typo (#15132) The expected output necessarily cannot match the formatted string. --- 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 d2bdb0fdc..3d9a9d42e 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)))