diff options
author | Oscar Campbell <oscar@campbell.nu> | 2015-05-25 20:03:12 +0200 |
---|---|---|
committer | Oscar Campbell <oscar@campbell.nu> | 2015-05-25 20:03:12 +0200 |
commit | 910dce70d6748b41ffbc39c731592716609c33f7 (patch) | |
tree | def6f945507f2a427080c534d8dcda4844446836 | |
parent | f6c12853ea996ef6307d0e5fd6738d0aaa2bd1e7 (diff) | |
download | Nim-910dce70d6748b41ffbc39c731592716609c33f7.tar.gz |
Remove double punctuation. Change "contrained" wording to "constraint".
-rw-r--r-- | doc/manual/procs.txt | 2 | ||||
-rw-r--r-- | doc/manual/trmacros.txt | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/doc/manual/procs.txt b/doc/manual/procs.txt index b76300e89..fb2c7a108 100644 --- a/doc/manual/procs.txt +++ b/doc/manual/procs.txt @@ -539,7 +539,7 @@ Closure iterators have other restrictions than inline iterators: 1. ``yield`` in a closure iterator can not occur in a ``try`` statement. 2. For now, a closure iterator cannot be evaluated at compile time. 3. ``return`` is allowed in a closure iterator (but rarely useful) and ends - iteration.. + iteration. 4. Neither inline nor closure iterators can be recursive. Iterators that are neither marked ``{.closure.}`` nor ``{.inline.}`` explicitly diff --git a/doc/manual/trmacros.txt b/doc/manual/trmacros.txt index 067349c30..de98e3a46 100644 --- a/doc/manual/trmacros.txt +++ b/doc/manual/trmacros.txt @@ -43,8 +43,9 @@ Fortunately Nim supports side effect analysis: echo f() * 2 # not optimized ;-) -You can make one overload for constrained match and without, and the constrained -will be prioritized, and so you can handle both cases differently. +You can make one overload matching with a constraint and one without, and the +one with a constraint will have precedence, and so you can handle both cases +differently. So what about ``2 * a``? We should tell the compiler ``*`` is commutative. We cannot really do that however as the following code only swaps arguments |