diff options
author | Oliver Daniel <oliverdaniel00@gmail.com> | 2020-07-31 10:35:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-31 16:35:50 +0200 |
commit | 4bf8d38248f40cc0bf5323843a9ea38c5bcc20a8 (patch) | |
tree | 56121a1d5a2189dab8d91c1fc6a4d1ae2b901d00 | |
parent | d23ae4953510287c64e5bbbfb8c0e1eea23822f6 (diff) | |
download | Nim-4bf8d38248f40cc0bf5323843a9ea38c5bcc20a8.tar.gz |
Small typo (#15132)
The expected output necessarily cannot match the formatted string.
-rw-r--r-- | lib/pure/sugar.nim | 2 |
1 files changed, 1 insertions, 1 deletions
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))) |