* drop number sections in menu due to readthedocs theme incompatibility
* fix some missing docstrings
* add missing docs for some Scopes modules
* various wording and formatting docstring fixes
M doc/docs/extra.css +8 -47
@@ 2,76 2,37 @@ body {
     counter-reset: chapter;
 }
 
-div.section h1 {
+div.section > h1 {
     counter-reset: section;
 }
 
-div.section h2 {
+div.section > h2 {
     counter-reset: subsection;
 }
 
-div.section h3 {
+div.section > h3 {
     counter-reset: subsubsection;
 }
 
-div.section h1#the-scopes-programming-infrastructure:before, h1#search:before {
+div.section > h1#the-scopes-programming-infrastructure:before, h1#search:before {
     content: none;
 }
 
-div.section h1:before {
+div.section > h1:before {
     content: counter(chapter) ". ";
 }
 
-div.section h2:before {
+div.section > h2:before {
     counter-increment: section;
     content: counter(chapter) "." counter(section) ". ";
 }
 
-div.section h3:before {
+div.section > h3:before {
     counter-increment: subsection;
     content: counter(chapter) "." counter(section) "." counter(subsection) ". ";
 }
 
-div.section h4:before {
+div.section > h4:before {
     counter-increment: subsubsection;
     content: counter(chapter) "." counter(section) "." counter(subsection) "." counter(subsubsection) ". ";
 }
-
-div.wy-menu {
-    counter-reset: menu-chapter
-}
-
-div.wy-menu>ul li.toctree-l1 {
-    counter-increment: menu-chapter;
-    counter-reset: menu-section;
-}
-
-div.wy-menu>ul li.toctree-l1>a:before {
-    content: counter(menu-chapter) ". ";
-}
-
-div.wy-menu>ul li.toctree-l2 {
-    counter-increment: menu-section;
-    counter-reset: menu-subsection;
-}
-
-div.wy-menu>ul li.toctree-l2>a:before {
-    content: counter(menu-chapter) "." counter(menu-section) ". ";
-}
-
-div.wy-menu>ul li.toctree-l3 {
-    counter-increment: menu-subsection;
-    counter-reset: menu-subsubsection;
-}
-
-div.wy-menu>ul li.toctree-l3>a:before {
-    content: counter(menu-chapter) "." counter(menu-section) "." counter(menu-subsection) ". ";
-}
-
-div.wy-menu>ul li.toctree-l4 {
-    counter-increment: menu-subsubsection;
-}
-
-div.wy-menu>ul li.toctree-l4>a:before {
-    content: counter(menu-chapter) "." counter(menu-section) "." counter(menu-subsection) "." counter(menu-subsubsection) ". ";
-}

          
M doc/docs/module-Array.md +1 -1
@@ 91,7 91,7 @@ than in registers or the stack.
 
     *fn*{.property} `resize`{.descname} (* self count args... *)[](#scopes.Array.fn.resize "Permalink to this definition"){.headerlink} {#scopes.Array.fn.resize}
 
-    :   Resize the array to the specified count. Items are apppend or removed
+    :   Resize the array to the specified count. Items are appended or removed
         to meet the desired count.
 
     *inline*{.property} `reverse`{.descname} (* self *)[](#scopes.Array.inline.reverse "Permalink to this definition"){.headerlink} {#scopes.Array.inline.reverse}

          
M doc/docs/module-FunctionChain.md +1 -1
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 12; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 13; }</style>
 
 FunctionChain
 =============

          
M doc/docs/module-Map.md +7 -7
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 16; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 17; }</style>
 
 Map
 ===

          
@@ 39,8 39,8 @@ This module implements a key -> value st
 
     *fn*{.property} `discard`{.descname} (*&ensp;self key&ensp;*)[](#scopes.Map.fn.discard "Permalink to this definition"){.headerlink} {#scopes.Map.fn.discard}
 
-    :   erases a key -> value association from the map; if the map
-        does not contain this key, nothing happens.
+    :   Erases a key -> value association from the map; if the map does not
+        contain this key, nothing happens.
 
     *fn*{.property} `dump`{.descname} (*&ensp;self&ensp;*)[](#scopes.Map.fn.dump "Permalink to this definition"){.headerlink} {#scopes.Map.fn.dump}
 

          
@@ 48,11 48,11 @@ This module implements a key -> value st
 
     *fn*{.property} `get`{.descname} (*&ensp;self key&ensp;*)[](#scopes.Map.fn.get "Permalink to this definition"){.headerlink} {#scopes.Map.fn.get}
 
-    :   returns the value associated with key or raises an error
+    :   Returns the value associated with key or raises an error.
 
     *fn*{.property} `getdefault`{.descname} (*&ensp;self key value&ensp;*)[](#scopes.Map.fn.getdefault "Permalink to this definition"){.headerlink} {#scopes.Map.fn.getdefault}
 
-    :   returns the value associated with key or raises an error
+    :   Returns the value associated with key or raises an error.
 
     *fn*{.property} `in?`{.descname} (*&ensp;self key&ensp;*)[](#scopes.Map.fn.in? "Permalink to this definition"){.headerlink} {#scopes.Map.fn.in?}
 

          
@@ 60,13 60,13 @@ This module implements a key -> value st
 
     *fn*{.property} `set`{.descname} (*&ensp;self key value&ensp;*)[](#scopes.Map.fn.set "Permalink to this definition"){.headerlink} {#scopes.Map.fn.set}
 
-    :   inserts a new key -> value association into map; key can be the
+    :   Inserts a new key -> value association into map; key can be the
         output of any custom hash function. If the key already exists,
         it will be updated.
 
     *fn*{.property} `terseness`{.descname} (*&ensp;self&ensp;*)[](#scopes.Map.fn.terseness "Permalink to this definition"){.headerlink} {#scopes.Map.fn.terseness}
 
-    :   computes the hashmap load as a normal between 0.0 and 1.0
+    :   Computes the hashmap load as a normal between 0.0 and 1.0.
 
 *type*{.property} `MapError`{.descname} [](#scopes.type.MapError "Permalink to this definition"){.headerlink} {#scopes.type.MapError}
 

          
A => doc/docs/module-Option.md +19 -0
@@ 0,0 1,19 @@ 
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 18; }</style>
+
+Option
+======
+
+Provides a value type that can be undefined.
+
+*type*{.property} `UnwrapError`{.descname} [](#scopes.type.UnwrapError "Permalink to this definition"){.headerlink} {#scopes.type.UnwrapError}
+
+:   A plain type of storage type `(tuple )`.
+
+    *inline*{.property} `__typecall`{.descname} (*&ensp;cls&ensp;*)[](#scopes.UnwrapError.inline.__typecall "Permalink to this definition"){.headerlink} {#scopes.UnwrapError.inline.__typecall}
+
+    :   
+
+*inline*{.property} `Option`{.descname} (*&ensp;...&ensp;*)[](#scopes.inline.Option "Permalink to this definition"){.headerlink} {#scopes.inline.Option}
+
+:   
+

          
A => doc/docs/module-Rc.md +113 -0
@@ 0,0 1,113 @@ 
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 20; }</style>
+
+Rc
+==
+
+A reference counted value that is dropped when all users are dropped. This
+module provides a strong reference type `Rc`, as well as a weak reference
+type `Weak`.
+
+*type*{.property} `Rc`{.descname} [](#scopes.type.Rc "Permalink to this definition"){.headerlink} {#scopes.type.Rc}
+
+:   An opaque type of supertype `ReferenceCounted`.
+
+    *inline*{.property} `__=`{.descname} (*&ensp;selfT otherT&ensp;*)[](#scopes.Rc.inline.__= "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__=}
+
+    :   
+
+    *inline*{.property} `__==`{.descname} (*&ensp;...&ensp;*)[](#scopes.Rc.inline.__== "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__==}
+
+    :   
+
+    *inline*{.property} `__@`{.descname} (*&ensp;self keys...&ensp;*)[](#scopes.Rc.inline.__@ "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__@}
+
+    :   
+
+    *spice*{.property} `__as`{.descname} (*&ensp;...&ensp;*)[](#scopes.Rc.spice.__as "Permalink to this definition"){.headerlink} {#scopes.Rc.spice.__as}
+
+    :   
+
+    *inline*{.property} `__call`{.descname} (*&ensp;self ...&ensp;*)[](#scopes.Rc.inline.__call "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__call}
+
+    :   
+
+    *inline*{.property} `__countof`{.descname} (*&ensp;self&ensp;*)[](#scopes.Rc.inline.__countof "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__countof}
+
+    :   
+
+    *inline*{.property} `__drop`{.descname} (*&ensp;self&ensp;*)[](#scopes.Rc.inline.__drop "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__drop}
+
+    :   
+
+    *spice*{.property} `__getattr`{.descname} (*&ensp;...&ensp;*)[](#scopes.Rc.spice.__getattr "Permalink to this definition"){.headerlink} {#scopes.Rc.spice.__getattr}
+
+    :   
+
+    *inline*{.property} `__hash`{.descname} (*&ensp;self&ensp;*)[](#scopes.Rc.inline.__hash "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__hash}
+
+    :   
+
+    *spice*{.property} `__imply`{.descname} (*&ensp;...&ensp;*)[](#scopes.Rc.spice.__imply "Permalink to this definition"){.headerlink} {#scopes.Rc.spice.__imply}
+
+    :   
+
+    *spice*{.property} `__methodcall`{.descname} (*&ensp;...&ensp;*)[](#scopes.Rc.spice.__methodcall "Permalink to this definition"){.headerlink} {#scopes.Rc.spice.__methodcall}
+
+    :   
+
+    *inline*{.property} `__repr`{.descname} (*&ensp;self&ensp;*)[](#scopes.Rc.inline.__repr "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.__repr}
+
+    :   
+
+    *spice*{.property} `__static-imply`{.descname} (*&ensp;...&ensp;*)[](#scopes.Rc.spice.__static-imply "Permalink to this definition"){.headerlink} {#scopes.Rc.spice.__static-imply}
+
+    :   
+
+    *inline*{.property} `make-cast-op`{.descname} (*&ensp;f const?&ensp;*)[](#scopes.Rc.inline.make-cast-op "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.make-cast-op}
+
+    :   
+
+    *inline*{.property} `new`{.descname} (*&ensp;T args...&ensp;*)[](#scopes.Rc.inline.new "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.new}
+
+    :   
+
+    *inline*{.property} `wrap`{.descname} (*&ensp;value&ensp;*)[](#scopes.Rc.inline.wrap "Permalink to this definition"){.headerlink} {#scopes.Rc.inline.wrap}
+
+    :   
+
+*type*{.property} `UpgradeError`{.descname} [](#scopes.type.UpgradeError "Permalink to this definition"){.headerlink} {#scopes.type.UpgradeError}
+
+:   A plain type of storage type `(tuple )`.
+
+    *inline*{.property} `__typecall`{.descname} (*&ensp;cls&ensp;*)[](#scopes.UpgradeError.inline.__typecall "Permalink to this definition"){.headerlink} {#scopes.UpgradeError.inline.__typecall}
+
+    :   
+
+*type*{.property} `Weak`{.descname} [](#scopes.type.Weak "Permalink to this definition"){.headerlink} {#scopes.type.Weak}
+
+:   An opaque type of supertype `ReferenceCounted`.
+
+    *inline*{.property} `__==`{.descname} (*&ensp;...&ensp;*)[](#scopes.Weak.inline.__== "Permalink to this definition"){.headerlink} {#scopes.Weak.inline.__==}
+
+    :   
+
+    *inline*{.property} `__drop`{.descname} (*&ensp;self&ensp;*)[](#scopes.Weak.inline.__drop "Permalink to this definition"){.headerlink} {#scopes.Weak.inline.__drop}
+
+    :   
+
+    *inline*{.property} `__rimply`{.descname} (*&ensp;T cls&ensp;*)[](#scopes.Weak.inline.__rimply "Permalink to this definition"){.headerlink} {#scopes.Weak.inline.__rimply}
+
+    :   
+
+    *fn*{.property} `_drop`{.descname} (*&ensp;self&ensp;*)[](#scopes.Weak.fn._drop "Permalink to this definition"){.headerlink} {#scopes.Weak.fn._drop}
+
+    :   
+
+    *fn*{.property} `force-upgrade`{.descname} (*&ensp;self&ensp;*)[](#scopes.Weak.fn.force-upgrade "Permalink to this definition"){.headerlink} {#scopes.Weak.fn.force-upgrade}
+
+    :   
+
+    *fn*{.property} `upgrade`{.descname} (*&ensp;self&ensp;*)[](#scopes.Weak.fn.upgrade "Permalink to this definition"){.headerlink} {#scopes.Weak.fn.upgrade}
+
+    :   
+

          
A => doc/docs/module-Set.md +73 -0
@@ 0,0 1,73 @@ 
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 21; }</style>
+
+Set
+===
+
+This module implements mathematical sets using hashtables.
+
+*type*{.property} `Set`{.descname} [](#scopes.type.Set "Permalink to this definition"){.headerlink} {#scopes.type.Set}
+
+:   An opaque type of supertype `Struct`.
+
+    *inline*{.property} `__as`{.descname} (*&ensp;cls T&ensp;*)[](#scopes.Set.inline.__as "Permalink to this definition"){.headerlink} {#scopes.Set.inline.__as}
+
+    :   
+
+    *inline*{.property} `__countof`{.descname} (*&ensp;self&ensp;*)[](#scopes.Set.inline.__countof "Permalink to this definition"){.headerlink} {#scopes.Set.inline.__countof}
+
+    :   
+
+    *fn*{.property} `__drop`{.descname} (*&ensp;self&ensp;*)[](#scopes.Set.fn.__drop "Permalink to this definition"){.headerlink} {#scopes.Set.fn.__drop}
+
+    :   
+
+    *inline*{.property} `__rin`{.descname} (*&ensp;...&ensp;*)[](#scopes.Set.inline.__rin "Permalink to this definition"){.headerlink} {#scopes.Set.inline.__rin}
+
+    :   
+
+    *inline*{.property} `__tobool`{.descname} (*&ensp;self&ensp;*)[](#scopes.Set.inline.__tobool "Permalink to this definition"){.headerlink} {#scopes.Set.inline.__tobool}
+
+    :   
+
+    *inline*{.property} `__typecall`{.descname} (*&ensp;cls opts...&ensp;*)[](#scopes.Set.inline.__typecall "Permalink to this definition"){.headerlink} {#scopes.Set.inline.__typecall}
+
+    :   
+
+    *fn*{.property} `clear`{.descname} (*&ensp;self&ensp;*)[](#scopes.Set.fn.clear "Permalink to this definition"){.headerlink} {#scopes.Set.fn.clear}
+
+    :   
+
+    *fn*{.property} `discard`{.descname} (*&ensp;self key&ensp;*)[](#scopes.Set.fn.discard "Permalink to this definition"){.headerlink} {#scopes.Set.fn.discard}
+
+    :   Erases a key -> value association from the map; if the map does not
+        contain this key, nothing happens.
+
+    *fn*{.property} `dump`{.descname} (*&ensp;self&ensp;*)[](#scopes.Set.fn.dump "Permalink to this definition"){.headerlink} {#scopes.Set.fn.dump}
+
+    :   
+
+    *fn*{.property} `get`{.descname} (*&ensp;self key&ensp;*)[](#scopes.Set.fn.get "Permalink to this definition"){.headerlink} {#scopes.Set.fn.get}
+
+    :   Returns the value associated with key or raises an error.
+
+    *fn*{.property} `getdefault`{.descname} (*&ensp;self key value&ensp;*)[](#scopes.Set.fn.getdefault "Permalink to this definition"){.headerlink} {#scopes.Set.fn.getdefault}
+
+    :   Returns the value associated with key or value if the map does not
+        contain the key.
+
+    *fn*{.property} `in?`{.descname} (*&ensp;self key&ensp;*)[](#scopes.Set.fn.in? "Permalink to this definition"){.headerlink} {#scopes.Set.fn.in?}
+
+    :   
+
+    *fn*{.property} `insert`{.descname} (*&ensp;self key&ensp;*)[](#scopes.Set.fn.insert "Permalink to this definition"){.headerlink} {#scopes.Set.fn.insert}
+
+    :   Inserts a new key into set.
+
+    *fn*{.property} `pop`{.descname} (*&ensp;self&ensp;*)[](#scopes.Set.fn.pop "Permalink to this definition"){.headerlink} {#scopes.Set.fn.pop}
+
+    :   Discards an arbitrary key from the set and returns the discarded key.
+
+    *fn*{.property} `terseness`{.descname} (*&ensp;self&ensp;*)[](#scopes.Set.fn.terseness "Permalink to this definition"){.headerlink} {#scopes.Set.fn.terseness}
+
+    :   Computes the hashmap load as a normal between 0.0 and 1.0.
+

          
A => doc/docs/module-String.md +12 -0
@@ 0,0 1,12 @@ 
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 23; }</style>
+
+String
+======
+
+Provides a string type that manages a mutable byte buffer of varying size
+on the heap. Strings are guaranteed to be zero-terminated.
+
+*type*{.property} `String`{.descname} [](#scopes.type.String "Permalink to this definition"){.headerlink} {#scopes.type.String}
+
+:   An unique type labeled `<GrowingString i8>` of supertype `GrowingString` and of storage type `(tuple (_items = (mutable@ i8)) (_count = usize) (_capacity = usize))`.
+

          
M doc/docs/module-UTF-8.md +5 -5
@@ 1,20 1,20 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 20; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 26; }</style>
 
 UTF-8
 =====
 
 This module provides UTF-8 encoder and decoder collectors, as well as
-an UTF-8 aware `char` function.
+a UTF-8 aware `char` function.
 
 *inline*{.property} `decoder`{.descname} (*&ensp;coll&ensp;*)[](#scopes.inline.decoder "Permalink to this definition"){.headerlink} {#scopes.inline.decoder}
 
-:   convert a i8 character stream as UTF-8 codepoints of type i32.
-    invalid bytes are forwarded as negative numbers; negating the number
+:   Convert an i8 character stream as UTF-8 codepoints of type i32.
+    Invalid bytes are forwarded as negative numbers; negating the number
     yields the offending byte character.
 
 *inline*{.property} `encoder`{.descname} (*&ensp;coll&ensp;*)[](#scopes.inline.encoder "Permalink to this definition"){.headerlink} {#scopes.inline.encoder}
 
-:   convert an integer codepoint to i8 bytes.
+:   Convert an integer codepoint to i8 bytes;
     the collector forwards a byte at a time.
 
 *spice*{.property} `char`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.char "Permalink to this definition"){.headerlink} {#scopes.spice.char}

          
A => doc/docs/module-chaining.md +32 -0
@@ 0,0 1,32 @@ 
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 10; }</style>
+
+chaining
+========
+
+chaining provides the `-->` operator, which allows the nesting of
+expressions by chaining them in a sequence.
+
+*sugar*{.property} (`-->`{.descname} *&ensp;...&ensp;*) [](#scopes.sugar.--> "Permalink to this definition"){.headerlink} {#scopes.sugar.-->}
+
+:   Expands a processing chain into nested expressions so that each expression
+    is passed as a tailing argument to the following expression.
+    
+    `__` can be used as a placeholder token to position the previous expression.
+    
+    Example:
+    
+        :::scopes
+        --> x
+            f
+            g
+            h 2 __
+            k
+    
+    Expands to:
+    
+        :::scopes
+        k
+            h 2
+                g
+                    f x
+

          
M doc/docs/module-console.md +1 -1
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 10; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 11; }</style>
 
 console
 =======

          
M doc/docs/module-core.md +39 -39
@@ 180,7 180,7 @@ parses the command-line and optionally e
 *define*{.property} `operating-system`{.descname} [](#scopes.define.operating-system "Permalink to this definition"){.headerlink} {#scopes.define.operating-system}
 
 :   A string constant indicating the operating system the compiler was built
-    for. It equals to `"linux"` for Linux builds, `"windows"` for Windows
+    for. It is equal to `"linux"` for Linux builds, `"windows"` for Windows
     builds, `"macos"` for macOS builds and `"unknown"` otherwise.
 
 *define*{.property} `pi`{.descname} [](#scopes.define.pi "Permalink to this definition"){.headerlink} {#scopes.define.pi}

          
@@ 880,11 880,10 @@ parses the command-line and optionally e
       previous state. The function may not be called for a state for which
       `valid?` has reported to be depleted.
     
-    It is allowed to call any of these functions multiple times with any valid
-    state, effectively restarting the Generator at an arbitrary point, as
-    Generators are not expected to have side effects. In controlled
-    circumstances a Generator may choose to be impure, but should be documented
-    accordingly.
+    Any of these functions may be called multiple times with any valid state,
+    effectively restarting the Generator at an arbitrary point, as Generators
+    are not expected to have side effects. In controlled circumstances a
+    Generator may choose to be impure, but should be documented accordingly.
     
     Here is a typical pattern for constructing a generator:
     

          
@@ 974,7 973,7 @@ parses the command-line and optionally e
 
 *type*{.property} `NullType`{.descname} [](#scopes.type.NullType "Permalink to this definition"){.headerlink} {#scopes.type.NullType}
 
-:   A plain type of storage type `(opaque@ void)`.
+:   The type of the `null` constant. This type is uninstantiable.
 
     *spice*{.property} `__==`{.descname} (*&ensp;...&ensp;*)[](#scopes.NullType.spice.__== "Permalink to this definition"){.headerlink} {#scopes.NullType.spice.__==}
 

          
@@ 2616,7 2615,7 @@ parses the command-line and optionally e
 
 *fn*{.property} `balanced-binary-operator`{.descname} (*&ensp;symbol rsymbol lhsT rhsT lhs-static? rhs-static?&ensp;*)[](#scopes.fn.balanced-binary-operator "Permalink to this definition"){.headerlink} {#scopes.fn.balanced-binary-operator}
 
-:   for an operation performed on two argument types, of which either
+:   For an operation performed on two argument types, of which either
     type can provide a suitable candidate, return a matching operator.
     This function only works inside a spice macro.
 

          
@@ 2630,7 2629,7 @@ parses the command-line and optionally e
 
 *fn*{.property} `balanced-lvalue-binary-operator`{.descname} (*&ensp;symbol lhsT rhsT rhs-static?&ensp;*)[](#scopes.fn.balanced-lvalue-binary-operator "Permalink to this definition"){.headerlink} {#scopes.fn.balanced-lvalue-binary-operator}
 
-:   for an operation performed on two argument types, of which only the
+:   For an operation performed on two argument types, of which only the
     left type type can provide a suitable candidate, return a matching operator.
     This function only works inside a spice macro.
 

          
@@ 2644,13 2643,13 @@ parses the command-line and optionally e
 
 *fn*{.property} `binary-operator`{.descname} (*&ensp;symbol lhsT rhsT&ensp;*)[](#scopes.fn.binary-operator "Permalink to this definition"){.headerlink} {#scopes.fn.binary-operator}
 
-:   for an operation performed on two argument types, of which only
+:   For an operation performed on two argument types, of which only
     the left type can provide a suitable candidate, find a matching
     operator function. This function only works inside a spice macro.
 
 *fn*{.property} `binary-operator-r`{.descname} (*&ensp;rsymbol lhsT rhsT&ensp;*)[](#scopes.fn.binary-operator-r "Permalink to this definition"){.headerlink} {#scopes.fn.binary-operator-r}
 
-:   for an operation performed on two argument types, of which only
+:   For an operation performed on two argument types, of which only
     the right type can provide a suitable candidate, find a matching
     operator function. This function only works inside a spice macro.
 

          
@@ 2676,8 2675,8 @@ parses the command-line and optionally e
 
 *fn*{.property} `cast-converter`{.descname} (*&ensp;symbol rsymbol vQT T&ensp;*)[](#scopes.fn.cast-converter "Permalink to this definition"){.headerlink} {#scopes.fn.cast-converter}
 
-:   for two given types, find a matching conversion function
-    this function only works inside a spice macro
+:   For two given types, find a matching conversion function.
+    This function only works inside a spice macro.
 
 *inline*{.property} `cast-error`{.descname} (*&ensp;intro-string vT T&ensp;*)[](#scopes.inline.cast-error "Permalink to this definition"){.headerlink} {#scopes.inline.cast-error}
 

          
@@ 2762,14 2761,14 @@ parses the command-line and optionally e
 
 *fn*{.property} `error@`{.descname} (*&ensp;anchor traceback-msg error-msg&ensp;*)[](#scopes.fn.error@ "Permalink to this definition"){.headerlink} {#scopes.fn.error@}
 
-:   usage example:
+:   Usage example:
     
         :::scopes
         error@ ('anchor value) "while checking parameter" "error in value"
 
 *fn*{.property} `error@+`{.descname} (*&ensp;error anchor traceback-msg&ensp;*)[](#scopes.fn.error@+ "Permalink to this definition"){.headerlink} {#scopes.fn.error@+}
 
-:   usage example:
+:   Usage example:
     
         :::scopes
         except (err)

          
@@ 2891,10 2890,9 @@ parses the command-line and optionally e
 
 *inline*{.property} `infinite-range`{.descname} (*&ensp;T&ensp;*)[](#scopes.inline.infinite-range "Permalink to this definition"){.headerlink} {#scopes.inline.infinite-range}
 
-:   A `Generator` that iterates through all integer values starting
-    at 0. This generator does never terminate; when it exceeds the maximum
-    integer value, it overflows and continues with the minimum integer value
-    of that type.
+:   A `Generator` that iterates through all integer values starting at 0. This
+    generator never terminates; when it exceeds the maximum integer value, it
+    overflows and continues with the minimum integer value of that type.
 
 *inline*{.property} `infix-op`{.descname} (*&ensp;pred&ensp;*)[](#scopes.inline.infix-op "Permalink to this definition"){.headerlink} {#scopes.inline.infix-op}
 

          
@@ 3070,8 3068,9 @@ parses the command-line and optionally e
 
 *inline*{.property} `rrange`{.descname} (*&ensp;a b c&ensp;*)[](#scopes.inline.rrange "Permalink to this definition"){.headerlink} {#scopes.inline.rrange}
 
-:   same as range, but iterates range in reverse; arguments are passed
-    in the same format, so rrange can act as a drop-in replacement for range.
+:   Same as `range`, but iterates range in reverse; arguments are passed
+    in the same format, so `rrange` can act as a drop-in replacement for
+    `range`.
 
 *fn*{.property} `rtl-infix-op-eq`{.descname} (*&ensp;infix-table token prec&ensp;*)[](#scopes.fn.rtl-infix-op-eq "Permalink to this definition"){.headerlink} {#scopes.fn.rtl-infix-op-eq}
 

          
@@ 3115,7 3114,7 @@ parses the command-line and optionally e
 
 *inline*{.property} `simple-binary-op`{.descname} (*&ensp;f&ensp;*)[](#scopes.inline.simple-binary-op "Permalink to this definition"){.headerlink} {#scopes.inline.simple-binary-op}
 
-:   for cases where the type only interacts with itself
+:   For cases where the type only interacts with itself.
 
 *inline*{.property} `simple-folding-autotype-binary-op`{.descname} (*&ensp;f unboxer&ensp;*)[](#scopes.inline.simple-folding-autotype-binary-op "Permalink to this definition"){.headerlink} {#scopes.inline.simple-folding-autotype-binary-op}
 

          
@@ 3143,22 3142,21 @@ parses the command-line and optionally e
 
 *inline*{.property} `spice-binary-op-macro`{.descname} (*&ensp;f&ensp;*)[](#scopes.inline.spice-binary-op-macro "Permalink to this definition"){.headerlink} {#scopes.inline.spice-binary-op-macro}
 
-:   to be used for binary operators of which either type can
-    provide an operation. returns a callable operator (f lhs rhs) that
-    performs the operation or no arguments if the operation can not be
-    performed.
+:   To be used for binary operators of which either type can provide an
+    operation. Returns a callable operator `(f lhs rhs)` that performs the
+    operation or no arguments if the operation can not be performed.
 
 *inline*{.property} `spice-cast-macro`{.descname} (*&ensp;f&ensp;*)[](#scopes.inline.spice-cast-macro "Permalink to this definition"){.headerlink} {#scopes.inline.spice-cast-macro}
 
-:   to be used for __as, __ras, __imply and __rimply
+:   To be used for __as, __ras, __imply and __rimply
     returns a callable converter (f value) that performs the cast or
     no arguments if the cast can not be performed.
 
 *inline*{.property} `spice-converter-macro`{.descname} (*&ensp;f&ensp;*)[](#scopes.inline.spice-converter-macro "Permalink to this definition"){.headerlink} {#scopes.inline.spice-converter-macro}
 
-:   to be used for converter that need to do additional
-    dispatch, e.g. do something else when the value is a constant
-    returns a quote that performs the cast (f value T)
+:   To be used for a converter that needs to do additional
+    dispatch (i.e. do something else when the value is a constant).
+    Returns a quote that performs the cast (f value T).
 
 *inline*{.property} `spice-macro`{.descname} (*&ensp;l&ensp;*)[](#scopes.inline.spice-macro "Permalink to this definition"){.headerlink} {#scopes.inline.spice-macro}
 

          
@@ 3198,7 3196,7 @@ parses the command-line and optionally e
 
 *inline*{.property} `swap`{.descname} (*&ensp;a b&ensp;*)[](#scopes.inline.swap "Permalink to this definition"){.headerlink} {#scopes.inline.swap}
 
-:   safely exchanges the contents of two references
+:   Safely exchanges the contents of two references.
 
 *inline*{.property} `type-comparison-func`{.descname} (*&ensp;f&ensp;*)[](#scopes.inline.type-comparison-func "Permalink to this definition"){.headerlink} {#scopes.inline.type-comparison-func}
 

          
@@ 3230,7 3228,7 @@ parses the command-line and optionally e
 
 *fn*{.property} `unary-operator`{.descname} (*&ensp;symbol T&ensp;*)[](#scopes.fn.unary-operator "Permalink to this definition"){.headerlink} {#scopes.fn.unary-operator}
 
-:   for an operation performed on one variable argument type, find a
+:   For an operation performed on one variable argument type, find a
     matching operator function. This function only works inside a spice
     macro.
 

          
@@ 3280,8 3278,9 @@ parses the command-line and optionally e
 
 *fn*{.property} `uncomma`{.descname} (*&ensp;l&ensp;*)[](#scopes.fn.uncomma "Permalink to this definition"){.headerlink} {#scopes.fn.uncomma}
 
-:   uncomma list l, wrapping all comma separated symbols as new lists
-    example:
+:   uncomma list l, wrapping all comma separated symbols as new lists.
+    
+    Usage example:
     
         :::scopes
         (uncomma '(a , b c d , e f , g h)) -> '(a (b c d) (e f) (g h))

          
@@ 3460,11 3459,12 @@ parses the command-line and optionally e
     to abort the loop early or skip ahead to the next element. The loop
     will always evaluate to no arguments.
 
-    For a loop form that permits you to maintain additional state and break
+    For a loop form that allows maintaining additional state and break
     with a value, see `fold`.
 
     Usage example:
 
+        :::scopes
         # print numbers from 0 to 9, skipping number 5
         for i in (range 100)
             if (i == 10)

          
@@ 3564,7 3564,7 @@ parses the command-line and optionally e
 
 *sugar*{.property} (`typedef`{.descname} *&ensp;...&ensp;*) [](#scopes.sugar.typedef "Permalink to this definition"){.headerlink} {#scopes.sugar.typedef}
 
-:   a type declaration syntax; when the name is a string, the type is declared
+:   A type declaration syntax; when the name is a string, the type is declared
     at runtime.
 
 *sugar*{.property} (`typedef+`{.descname} *&ensp;...&ensp;*) [](#scopes.sugar.typedef+ "Permalink to this definition"){.headerlink} {#scopes.sugar.typedef+}

          
@@ 4493,7 4493,7 @@ parses the command-line and optionally e
 
 *spice*{.property} `and-branch`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.and-branch "Permalink to this definition"){.headerlink} {#scopes.spice.and-branch}
 
-:   The type of the `null` constant. This type is uninstantiable.
+:   
 
 *spice*{.property} `append-to-scope`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.append-to-scope "Permalink to this definition"){.headerlink} {#scopes.spice.append-to-scope}
 

          
@@ 4650,7 4650,7 @@ parses the command-line and optionally e
         :::scopes
         from (methodsof <object>) let method1 method2
     
-    now the imported methods are implicitly bound to `<object>` and can be
+    Now the imported methods are implicitly bound to `<object>` and can be
     called directly.
 
 *spice*{.property} `min`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.min "Permalink to this definition"){.headerlink} {#scopes.spice.min}

          
@@ 4902,7 4902,7 @@ parses the command-line and optionally e
 
 *spice*{.property} `va-unnamed`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.va-unnamed "Permalink to this definition"){.headerlink} {#scopes.spice.va-unnamed}
 
-:    filter all keyed values
+:   Filter all keyed values.
 
 *spice*{.property} `va@`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.va@ "Permalink to this definition"){.headerlink} {#scopes.spice.va@}
 

          
M doc/docs/module-enum.md +1 -1
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 11; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 12; }</style>
 
 enum
 ====

          
M doc/docs/module-glm.md +1 -1
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 13; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 14; }</style>
 
 glm
 ===

          
M doc/docs/module-glsl.md +1 -1
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 14; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 15; }</style>
 
 glsl
 ====

          
M doc/docs/module-itertools.md +25 -24
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 15; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 16; }</style>
 
 itertools
 =========

          
@@ 16,34 16,35 @@ generators and collectors.
 
 *inline*{.property} `bitdim`{.descname} (*&ensp;x n...&ensp;*)[](#scopes.inline.bitdim "Permalink to this definition"){.headerlink} {#scopes.inline.bitdim}
 
-:   a variant of dim optimized for power of two sizes; the dimensions are
-    specified as exponents of 2
+:   A variant of dim optimized for power of two sizes; the dimensions are
+    specified as exponents of 2.
 
 *inline*{.property} `cascade`{.descname} (*&ensp;collector...&ensp;*)[](#scopes.inline.cascade "Permalink to this definition"){.headerlink} {#scopes.inline.cascade}
 
-:   two collectors:
-    every time a is full, b collects a and a is reset
-    when b ends, the remainder of a is collected
+:   Two collectors:
+    
+    - Every time a is full, b collects a and a is reset.
+    - When b ends, the remainder of a is collected.
 
 *inline*{.property} `cat`{.descname} (*&ensp;coll&ensp;*)[](#scopes.inline.cat "Permalink to this definition"){.headerlink} {#scopes.inline.cat}
 
-:   treat input as a generator and forward its arguments individually
+:   Treat input as a generator and forward its arguments individually.
 
 *inline*{.property} `collect`{.descname} (*&ensp;coll&ensp;*)[](#scopes.inline.collect "Permalink to this definition"){.headerlink} {#scopes.inline.collect}
 
-:   run collector until full and return the result
+:   Run collector until full and return the result.
 
 *inline*{.property} `demux`{.descname} (*&ensp;init-value f collector...&ensp;*)[](#scopes.inline.demux "Permalink to this definition"){.headerlink} {#scopes.inline.demux}
 
-:   
+:   A reducing sink for mux streams.
 
 *inline*{.property} `dim`{.descname} (*&ensp;x n...&ensp;*)[](#scopes.inline.dim "Permalink to this definition"){.headerlink} {#scopes.inline.dim}
 
-:   a branchless generator that iterates multidimensional coordinates
+:   A branchless generator that iterates multidimensional coordinates.
 
 *inline*{.property} `each`{.descname} (*&ensp;generator collector&ensp;*)[](#scopes.inline.each "Permalink to this definition"){.headerlink} {#scopes.inline.each}
 
-:   fold output from generator into collector
+:   Fold output from generator into collector.
 
 *inline*{.property} `filter`{.descname} (*&ensp;f coll&ensp;*)[](#scopes.inline.filter "Permalink to this definition"){.headerlink} {#scopes.inline.filter}
 

          
@@ 51,13 52,13 @@ generators and collectors.
 
 *inline*{.property} `flatten`{.descname} (*&ensp;coll&ensp;*)[](#scopes.inline.flatten "Permalink to this definition"){.headerlink} {#scopes.inline.flatten}
 
-:   collect variadic input as individual single items
+:   Collect variadic input as individual single items.
 
 *inline*{.property} `gate`{.descname} (*&ensp;f a b&ensp;*)[](#scopes.inline.gate "Permalink to this definition"){.headerlink} {#scopes.inline.gate}
 
-:   if f is true, collect input in a, otherwise collect in b
-    when both are full, output both
-    until then, new input for full containers is discarded
+:   If f is true, collect input in a, otherwise collect in b. When both are
+    full, output both. Until both are full, new input for full containers
+    is discarded.
 
 *inline*{.property} `imap`{.descname} (*&ensp;gen f&ensp;*)[](#scopes.inline.imap "Permalink to this definition"){.headerlink} {#scopes.inline.imap}
 

          
@@ 65,7 66,7 @@ generators and collectors.
 
 *inline*{.property} `ipair`{.descname} (*&ensp;gen N&ensp;*)[](#scopes.inline.ipair "Permalink to this definition"){.headerlink} {#scopes.inline.ipair}
 
-:   generate one variadic argument from N generated arguments
+:   Generate one variadic argument from N generated arguments.
 
 *inline*{.property} `limit`{.descname} (*&ensp;f coll&ensp;*)[](#scopes.inline.limit "Permalink to this definition"){.headerlink} {#scopes.inline.limit}
 

          
@@ 77,15 78,15 @@ generators and collectors.
 
 *inline*{.property} `mux`{.descname} (*&ensp;collector...&ensp;*)[](#scopes.inline.mux "Permalink to this definition"){.headerlink} {#scopes.inline.mux}
 
-:   send input into multiple collectors which each fork the target collector
+:   Send input into multiple collectors which each fork the target collector.
 
-*inline*{.property} `permutate-range`{.descname} (*&ensp;...&ensp;*)[](#scopes.inline.permutate-range "Permalink to this definition"){.headerlink} {#scopes.inline.permutate-range}
+*inline*{.property} `permutate-range`{.descname} (*&ensp;n element-type&ensp;*)[](#scopes.inline.permutate-range "Permalink to this definition"){.headerlink} {#scopes.inline.permutate-range}
 
 :   Return a generator that iterates all permutations of the range from 0
     to `n`, where `n` must be smaller than 256, and returns a vector of
     `element-type` for each iteration. If `element-type` is omitted, the
     default element type will be i32.
-    
+
     The generator will perform `n!` iterations to complete.
 
 *inline*{.property} `reduce`{.descname} (*&ensp;init f&ensp;*)[](#scopes.inline.reduce "Permalink to this definition"){.headerlink} {#scopes.inline.reduce}

          
@@ 94,14 95,14 @@ generators and collectors.
 
 *inline*{.property} `retain`{.descname} (*&ensp;mapl ...&ensp;*)[](#scopes.inline.retain "Permalink to this definition"){.headerlink} {#scopes.inline.retain}
 
-:   feeds the input through a composition of collectors and feeds the
-    input along with the composition output to the next collector.
-    if mapl is not none, it allows to specify the portion of the input that
-    will be passed to the end point.
+:   Feeds the input through a composition of collectors and feeds the input
+    along with the composition output to the next collector. If mapl is not
+    none, it allows specifying the portion of the input that will be passed
+    to the end point.
 
 *inline*{.property} `take`{.descname} (*&ensp;n coll&ensp;*)[](#scopes.inline.take "Permalink to this definition"){.headerlink} {#scopes.inline.take}
 
-:   limit collector to output n items
+:   Limit collector to output n items.
 
 *spice*{.property} `compose`{.descname} (*&ensp;...&ensp;*)[](#scopes.spice.compose "Permalink to this definition"){.headerlink} {#scopes.spice.compose}
 

          
A => doc/docs/module-property.md +15 -0
@@ 0,0 1,15 @@ 
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 19; }</style>
+
+property
+========
+
+Provides a property accessor for types.
+
+*type*{.property} `Property`{.descname} [](#scopes.type.Property "Permalink to this definition"){.headerlink} {#scopes.type.Property}
+
+:   An opaque type.
+
+*inline*{.property} `property`{.descname} (*&ensp;...&ensp;*)[](#scopes.inline.property "Permalink to this definition"){.headerlink} {#scopes.inline.property}
+
+:   
+

          
M doc/docs/module-spicetools.md +1 -1
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 17; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 22; }</style>
 
 spicetools
 ==========

          
M doc/docs/module-struct.md +1 -1
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 18; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 24; }</style>
 
 struct
 ======

          
M doc/docs/module-testing.md +8 -7
@@ 1,4 1,4 @@ 
-<style type="text/css" rel="stylesheet">body { counter-reset: chapter 19; }</style>
+<style type="text/css" rel="stylesheet">body { counter-reset: chapter 25; }</style>
 
 testing
 =======

          
@@ 8,12 8,13 @@ fashion.
 
 *type*{.property} `One`{.descname} [](#scopes.type.One "Permalink to this definition"){.headerlink} {#scopes.type.One}
 
-:   this type is used for discovering leaks and double frees. It holds an integer
-    value as well as a pointer to a single reference on the heap which is 1 as
-    long as the object exists, otherwise 0. The refcount is leaked in
+:   This type is used for discovering leaks and double frees. It holds an
+    integer value as well as a pointer to a single reference on the heap which
+    is 1 as long as the object exists, otherwise 0. The refcount is leaked in
     order to not cause segfaults when a double free occurs.
     
-    In addition, a global refcounter is updated which can be checked for balance.
+    In addition, a global refcounter is updated which can be checked for
+    balance.
 
     *inline*{.property} `__!=`{.descname} (*&ensp;cls T&ensp;*)[](#scopes.One.inline.__!= "Permalink to this definition"){.headerlink} {#scopes.One.inline.__!=}
 

          
@@ 75,7 76,7 @@ fashion.
 
 :   A feature matrix that tests 2-d permutations
     
-    usage:
+    Usage:
     
         :::scopes
         features    B1  B2  B3 ...

          
@@ 84,7 85,7 @@ fashion.
             A2      N   Y   N
             A3      Y   N   Q
     
-    will expand to:
+    Will expand to:
     
         :::scopes
         do

          
M doc/mkdocs.yml +6 -0
@@ 12,6 12,7 @@ nav:
         - "Array": module-Array.md
         - "Box": module-Box.md
         - "Capture": module-Capture.md
+        - "chaining": module-chaining.md
         - "console": module-console.md
         - "enum": module-enum.md
         - "FunctionChain": module-FunctionChain.md

          
@@ 19,7 20,12 @@ nav:
         - "glsl": module-glsl.md
         - "itertools": module-itertools.md
         - "Map": module-Map.md
+        - "Option": module-Option.md
+        - "property": module-property.md
+        - "Rc": module-Rc.md
+        - "Set": module-Set.md
         - "spicetools": module-spicetools.md
+        - "String": module-String.md
         - "struct": module-struct.md
         - "testing": module-testing.md
         - "UTF-8": module-UTF-8.md

          
M doc/update_docs +23 -12
@@ 6,27 6,38 @@ echo "generating core..." \
     && ./build_reference.sc Box 8 > ./docs/module-Box.md \
     && echo "generating Capture..." \
     && ./build_reference.sc Capture 9 > ./docs/module-Capture.md \
+    && echo "generating Chaining..." \
+    && ./build_reference.sc chaining 10 > ./docs/module-Chaining.md \
     && echo "generating console..." \
-    && ./build_reference.sc console 10 > ./docs/module-console.md \
+    && ./build_reference.sc console 11 > ./docs/module-console.md \
     && echo "generating enum..." \
-    && ./build_reference.sc enum 11 > ./docs/module-enum.md \
+    && ./build_reference.sc enum 12 > ./docs/module-enum.md \
     && echo "generating FunctionChain..." \
-    && ./build_reference.sc FunctionChain 12 > ./docs/module-FunctionChain.md \
+    && ./build_reference.sc FunctionChain 13 > ./docs/module-FunctionChain.md \
     && echo "generating glm..." \
-    && ./build_reference.sc glm 13 > ./docs/module-glm.md \
+    && ./build_reference.sc glm 14 > ./docs/module-glm.md \
     && echo "generating glsl..." \
-    && ./build_reference.sc glsl 14 > ./docs/module-glsl.md \
+    && ./build_reference.sc glsl 15 > ./docs/module-glsl.md \
     && echo "generating itertools..." \
-    && ./build_reference.sc itertools 15 > ./docs/module-itertools.md \
+    && ./build_reference.sc itertools 16 > ./docs/module-itertools.md \
     && echo "generating Map..." \
-    && ./build_reference.sc Map 16 > ./docs/module-Map.md \
+    && ./build_reference.sc Map 17 > ./docs/module-Map.md \
+    && echo "generating Option..." \
+    && ./build_reference.sc Option 18 > ./docs/module-Option.md \
+    && echo "generating property..." \
+    && ./build_reference.sc property 19 > ./docs/module-property.md \
+    && echo "generating Rc..." \
+    && ./build_reference.sc Rc 20 > ./docs/module-Rc.md \
+    && echo "generating Set..." \
+    && ./build_reference.sc Set 21 > ./docs/module-Set.md \
     && echo "generating spicetools..." \
-    && ./build_reference.sc spicetools 17 > ./docs/module-spicetools.md \
+    && ./build_reference.sc spicetools 22 > ./docs/module-spicetools.md \
+    && echo "generating String..." \
+    && ./build_reference.sc String 23 > ./docs/module-String.md \
     && echo "generating struct..." \
-    && ./build_reference.sc struct 18 > ./docs/module-struct.md \
+    && ./build_reference.sc struct 24 > ./docs/module-struct.md \
     && echo "generating testing..." \
-    && ./build_reference.sc testing 19 > ./docs/module-testing.md \
+    && ./build_reference.sc testing 25 > ./docs/module-testing.md \
     && echo "generating UTF-8..." \
-    && ./build_reference.sc UTF-8 20 > ./docs/module-UTF-8.md \
+    && ./build_reference.sc UTF-8 26 > ./docs/module-UTF-8.md \
     && make clean && make html
-

          
M lib/scopes/Array.sc +4 -2
@@ 240,7 240,7 @@ typedef+ Array
         self._count = 0:usize
         return;
 
-    """"Resize the array to the specified count. Items are apppend or removed
+    """"Resize the array to the specified count. Items are appended or removed
         to meet the desired count.
     fn resize (self count args...)
         let count = (count as usize)

          
@@ 271,10 271,12 @@ typedef+ Array
 
     To construct a new fixed array type:
 
+        :::scopes
         FixedArray element-type capacity
 
     Instantiate a new array with mutable memory:
 
+        :::scopes
         local new-array : (FixedArray element-type capacity)
 typedef+ FixedArray
     let parent-type = this-type

          
@@ 336,7 338,7 @@ typedef+ FixedArray
 let DEFAULT_CAPACITY = (1:usize << 2:usize)
 
 """"The supertype and constructor for arrays of growing size. New instances
-    have a default capacity of 4, and grow by factor 2.7 each time their
+    have a default capacity of 4, and grow by a factor of 2.7 each time their
     capacity is exceeded.
 
     To construct a new growing array type:

          
M lib/scopes/Map.sc +8 -8
@@ 84,7 84,7 @@ typedef Map < Struct
         ((self._valid @ ofs) & flag) == flag
 
     fn terseness (self)
-        """"computes the hashmap load as a normal between 0.0 and 1.0
+        """"Computes the hashmap load as a normal between 0.0 and 1.0.
         self._count / (self._mask + 1:u64)
 
     inline insert_entry (self key keyhash value mask)

          
@@ 153,8 153,8 @@ typedef Map < Struct
         ;
 
     inline lookup (self key keyhash successf failf mask)
-        """"finds the index and address of an entry associated with key or
-            invokes label failf on failure
+        """"Finds the index and address of an entry associated with key or
+            invokes label failf on failure.
         let hash = ((typeof self) . HashFunction)
         let mask =
             static-if (none? mask) (deref self._mask)

          
@@ 254,7 254,7 @@ typedef Map < Struct
         return;
 
     fn set (self key value)
-        """"inserts a new key -> value association into map; key can be the
+        """"Inserts a new key -> value association into map; key can be the
             output of any custom hash function. If the key already exists,
             it will be updated.
         let hash = ((typeof self) . HashFunction)

          
@@ 315,7 315,7 @@ typedef Map < Struct
                 in? self (imply key KeyType)
 
     fn getdefault (self key value)
-        """"returns the value associated with key or raises an error
+        """"Returns the value associated with key or raises an error.
         let hash = ((typeof self) . HashFunction)
         lookup self key ((hash key) as u64)
             inline "ok" (idx)

          
@@ 324,7 324,7 @@ typedef Map < Struct
                 return (view value)
 
     fn get (self key)
-        """"returns the value associated with key or raises an error
+        """"Returns the value associated with key or raises an error.
         let hash = ((typeof self) . HashFunction)
         lookup self key ((hash key) as u64)
             inline "ok" (idx)

          
@@ 333,8 333,8 @@ typedef Map < Struct
                 raise (MapError.KeyNotFound)
 
     fn discard (self key)
-        """"erases a key -> value association from the map; if the map
-            does not contain this key, nothing happens.
+        """"Erases a key -> value association from the map; if the map does not
+            contain this key, nothing happens.
         let hash = ((typeof self) . HashFunction)
         lookup self key ((hash key) as u64)
             inline "ok" (idx)

          
M lib/scopes/Option.sc +1 -1
@@ 6,7 6,7 @@ 
 """"Option
     ======
 
-    Provides a value type that can be undefined
+    Provides a value type that can be undefined.
 
 using import .enum
 

          
M lib/scopes/Set.sc +10 -9
@@ 83,7 83,7 @@ typedef Set < Struct
         ((self._valid @ ofs) & flag) == flag
 
     fn terseness (self)
-        """"computes the hashmap load as a normal between 0.0 and 1.0
+        """"Computes the hashmap load as a normal between 0.0 and 1.0.
         self._count / (self._mask + 1:u64)
 
     fn... insert_entry (self, key, keyhash, mask = none)

          
@@ 148,8 148,8 @@ typedef Set < Struct
         result
 
     inline lookup (self key keyhash successf failf mask)
-        """"finds the index and address of an entry associated with key or
-            invokes label failf on failure
+        """"Finds the index and address of an entry associated with key or
+            invokes label failf on failure.
         let hash = ((typeof self) . HashFunction)
         let mask =
             static-if (none? mask) (deref self._mask)

          
@@ 239,7 239,7 @@ typedef Set < Struct
         return;
 
     fn insert (self key)
-        """"inserts a new key into set
+        """"Inserts a new key into set.
         let hash = ((typeof self) . HashFunction)
         let keyhash = ((hash key) as u64)
         lookup self key keyhash

          
@@ 272,7 272,8 @@ typedef Set < Struct
                 in? self (imply key KeyType)
 
     fn getdefault (self key value)
-        """"returns the value associated with key or raises an error
+        """"Returns the value associated with key or value if the map does not
+            contain the key.
         let hash = ((typeof self) . HashFunction)
         lookup self key ((hash key) as u64)
             inline "ok" (idx)

          
@@ 281,7 282,7 @@ typedef Set < Struct
                 return (view value)
 
     fn get (self key)
-        """"returns the value associated with key or raises an error
+        """"Returns the value associated with key or raises an error.
         let hash = ((typeof self) . HashFunction)
         lookup self key ((hash key) as u64)
             inline "ok" (idx)

          
@@ 290,8 291,8 @@ typedef Set < Struct
                 raise (MapError.KeyNotFound)
 
     fn discard (self key)
-        """"erases a key -> value association from the map; if the map
-            does not contain this key, nothing happens.
+        """"Erases a key -> value association from the map; if the map does not
+            contain this key, nothing happens.
         let hash = ((typeof self) . HashFunction)
         lookup self key ((hash key) as u64)
             inline "ok" (idx)

          
@@ 320,7 321,7 @@ typedef Set < Struct
             next
 
     fn pop (self)
-        """"discards an arbitrary key from the set and returns the discarded key
+        """"Discards an arbitrary key from the set and returns the discarded key.
         let init valid? at next = ((set-generator self))
         let it = (init)
         assert (valid? it)

          
M lib/scopes/String.sc +3 -3
@@ 6,8 6,8 @@ 
 """"String
     ======
 
-    Provides a string type that manages a mutable byte buffer of
-    varying size on the heap. Strings are guaranteed to be zero-terminated.
+    Provides a string type that manages a mutable byte buffer of varying size
+    on the heap. Strings are guaranteed to be zero-terminated.
 
 using import struct
 

          
@@ 415,7 415,7 @@ typedef+ FixedString
 let DEFAULT_CAPACITY = (1:usize << 2:usize)
 
 """"The supertype and constructor for strings of growing size. New instances
-    have a default capacity of 4, and grow by factor 2.7 each time their
+    have a default capacity of 4, and grow by a factor of 2.7 each time their
     capacity is exceeded.
 
     To construct a new growing string type:

          
M lib/scopes/UTF-8.sc +4 -4
@@ 7,7 7,7 @@ 
     =====
 
     This module provides UTF-8 encoder and decoder collectors, as well as
-    an UTF-8 aware `char` function.
+    a UTF-8 aware `char` function.
 
 using import enum
 

          
@@ 26,7 26,7 @@ inline ctlz-u32 (c)
     llvm.ctlz.u32 c false
 
 inline encoder (coll)
-    """"convert an integer codepoint to i8 bytes.
+    """"Convert an integer codepoint to i8 bytes;
         the collector forwards a byte at a time.
     inline _encoder (coll)
         let init full? done push = ((coll as Collector))

          
@@ 71,8 71,8 @@ inline encoder (coll)
 let BYTE_STEP = (1:u32 << 30:u32)
 let BYTE_MASK = (BYTE_STEP | (BYTE_STEP << 1:u32))
 inline decoder (coll)
-    """"convert a i8 character stream as UTF-8 codepoints of type i32.
-        invalid bytes are forwarded as negative numbers; negating the number
+    """"Convert an i8 character stream as UTF-8 codepoints of type i32.
+        Invalid bytes are forwarded as negative numbers; negating the number
         yields the offending byte character.
     inline _decoder (coll)
         let init full? done push = ((coll as Collector))

          
M lib/scopes/chaining.sc +7 -5
@@ 6,24 6,26 @@ 
 """"chaining
     ========
 
-    chaining provides the `-->` operator, which allows to nest expressions
-    by chaining them in a sequence.
+    chaining provides the `-->` operator, which allows the nesting of
+    expressions by chaining them in a sequence.
 
 """"Expands a processing chain into nested expressions so that each expression
-    is passed as tailing argument to the following expression.
+    is passed as a tailing argument to the following expression.
 
     `__` can be used as a placeholder token to position the previous expression.
 
-    example:
+    Example:
 
+        :::scopes
         --> x
             f
             g
             h 2 __
             k
 
-    expands to:
+    Expands to:
 
+        :::scopes
         k
             h 2
                 g

          
M lib/scopes/core.sc +38 -38
@@ 24,7 24,7 @@ let compiler-timestamp
 """"A boolean constant indicating if the compiler was built in debug mode.
 let debug-build?
 """"A string constant indicating the operating system the compiler was built
-    for. It equals to `"linux"` for Linux builds, `"windows"` for Windows
+    for. It is equal to `"linux"` for Linux builds, `"windows"` for Windows
     builds, `"macos"` for macOS builds and `"unknown"` otherwise.
 let operating-system
 """"A constant of type `i32` indicating the maximum number of recursions

          
@@ 43,7 43,7 @@ let square-list = spice-unquote-argument
 let intptr = u64
 
 inline swap (a b)
-    """"safely exchanges the contents of two references
+    """"Safely exchanges the contents of two references.
     let tmp = (deref (dupe b))
     assign (dupe a) b
     assign tmp a

          
@@ 79,7 79,7 @@ fn error (msg)
     raise (sc_error_new msg)
 
 fn error@ (anchor traceback-msg error-msg)
-    """"usage example:
+    """"Usage example:
 
             :::scopes
             error@ ('anchor value) "while checking parameter" "error in value"

          
@@ 89,7 89,7 @@ fn error@ (anchor traceback-msg error-ms
     raise err
 
 fn error@+ (error anchor traceback-msg)
-    """"usage example:
+    """"Usage example:
 
             :::scopes
             except (err)

          
@@ 870,6 870,7 @@ let
     type< = (spice-macro (type-comparison-func type<))
     type> = (spice-macro (type-comparison-func type>))
 
+""""The type of the `null` constant. This type is uninstantiable.
 let NullType = (sc_typename_type "NullType" typename)
 let Accessor = (sc_typename_type "Accessor" typename)
 sc_typename_type_set_storage Accessor (sc_type_storage Closure) typename-flag-plain

          
@@ 1230,11 1231,10 @@ sc_typename_type_set_opaque Struct
       previous state. The function may not be called for a state for which
       `valid?` has reported to be depleted.
 
-    It is allowed to call any of these functions multiple times with any valid
-    state, effectively restarting the Generator at an arbitrary point, as
-    Generators are not expected to have side effects. In controlled
-    circumstances a Generator may choose to be impure, but should be documented
-    accordingly.
+    Any of these functions may be called multiple times with any valid state,
+    effectively restarting the Generator at an arbitrary point, as Generators
+    are not expected to have side effects. In controlled circumstances a
+    Generator may choose to be impure, but should be documented accordingly.
 
     Here is a typical pattern for constructing a generator:
 

          
@@ 1311,7 1311,7 @@ fn value-as (vT T expr)
             inline "Value-rimply" (self) `self
 
 inline spice-cast-macro (f)
-    """"to be used for __as, __ras, __imply and __rimply
+    """"To be used for __as, __ras, __imply and __rimply
         returns a callable converter (f value) that performs the cast or
         no arguments if the cast can not be performed.
     spice-macro

          
@@ 1324,9 1324,9 @@ inline spice-cast-macro (f)
             f source-type target-type
 
 inline spice-converter-macro (f)
-    """"to be used for converter that need to do additional
-        dispatch, e.g. do something else when the value is a constant
-        returns a quote that performs the cast (f value T)
+    """"To be used for a converter that needs to do additional
+        dispatch (i.e. do something else when the value is a constant).
+        Returns a quote that performs the cast (f value T).
     spice-macro
         fn (args)
             raising Error

          
@@ 1575,8 1575,8 @@ fn operator-valid? (value)
     ptrcmp!= ('typeof value) void
 
 fn cast-converter (symbol rsymbol vQT T)
-    """"for two given types, find a matching conversion function
-        this function only works inside a spice macro
+    """"For two given types, find a matching conversion function.
+        This function only works inside a spice macro.
     let vT = ('strip-qualifiers vQT)
     label next
         let f =

          
@@ 1654,7 1654,7 @@ let as = (gen-cast-op as-converter "can'
 #------------------------------------------------------------------------------
 
 fn unary-operator (symbol T)
-    """"for an operation performed on one variable argument type, find a
+    """"For an operation performed on one variable argument type, find a
         matching operator function. This function only works inside a spice
         macro.
     label next

          
@@ 1666,7 1666,7 @@ fn unary-operator (symbol T)
     return (sc_empty_argument_list)
 
 fn binary-operator (symbol lhsT rhsT)
-    """"for an operation performed on two argument types, of which only
+    """"For an operation performed on two argument types, of which only
         the left type can provide a suitable candidate, find a matching
         operator function. This function only works inside a spice macro.
     label next

          
@@ 1678,7 1678,7 @@ fn binary-operator (symbol lhsT rhsT)
     return (sc_empty_argument_list)
 
 fn binary-operator-r (rsymbol lhsT rhsT)
-    """"for an operation performed on two argument types, of which only
+    """"For an operation performed on two argument types, of which only
         the right type can provide a suitable candidate, find a matching
         operator function. This function only works inside a spice macro.
     label next

          
@@ 1690,7 1690,7 @@ fn binary-operator-r (rsymbol lhsT rhsT)
     return (sc_empty_argument_list)
 
 fn balanced-binary-operator (symbol rsymbol lhsT rhsT lhs-static? rhs-static?)
-    """"for an operation performed on two argument types, of which either
+    """"For an operation performed on two argument types, of which either
         type can provide a suitable candidate, return a matching operator.
         This function only works inside a spice macro.
     # try the left type

          
@@ 1722,7 1722,7 @@ fn balanced-binary-operator (symbol rsym
 
 # right hand has same type as left hand
 fn balanced-lvalue-binary-operator (symbol lhsT rhsT rhs-static?)
-    """"for an operation performed on two argument types, of which only the
+    """"For an operation performed on two argument types, of which only the
         left type type can provide a suitable candidate, return a matching operator.
         This function only works inside a spice macro.
     # try the left type

          
@@ 1866,10 1866,9 @@ inline unbalanced-binary-op-dispatch (sy
             unbalanced-binary-operation args symbol rtype friendly-op-name
 
 inline spice-binary-op-macro (f)
-    """"to be used for binary operators of which either type can
-        provide an operation. returns a callable operator (f lhs rhs) that
-        performs the operation or no arguments if the operation can not be
-        performed.
+    """"To be used for binary operators of which either type can provide an
+        operation. Returns a callable operator `(f lhs rhs)` that performs the
+        operation or no arguments if the operation can not be performed.
     spice-macro
         fn (args)
             raising Error

          
@@ 1880,7 1879,7 @@ inline spice-binary-op-macro (f)
             f lhs-type rhs-type
 
 inline simple-binary-op (f)
-    """"for cases where the type only interacts with itself
+    """"For cases where the type only interacts with itself.
     spice-binary-op-macro
         inline (lhsT rhsT)
             if (ptrcmp== lhsT rhsT)

          
@@ 2261,7 2260,6 @@ inline intdiv (a b)
 # null type
 #---------------------------------------------------------------------------
 
-""""The type of the `null` constant. This type is uninstantiable.
 'set-plain-storage NullType (pointer void)
 do
     inline null== (lhs rhs) (icmp== (ptrtoint rhs usize) 0:usize)

          
@@ 3684,11 3682,12 @@ fn next-head? (next)
         to abort the loop early or skip ahead to the next element. The loop
         will always evaluate to no arguments.
 
-        For a loop form that permits you to maintain additional state and break
+        For a loop form that allows maintaining additional state and break
         with a value, see `fold`.
 
         Usage example:
 
+            :::scopes
             # print numbers from 0 to 9, skipping number 5
             for i in (range 100)
                 if (i == 10)

          
@@ 4530,8 4529,9 @@ inline range (a b c)
         inline (x) (x + step)
 
 inline rrange (a b c)
-    """"same as range, but iterates range in reverse; arguments are passed
-        in the same format, so rrange can act as a drop-in replacement for range.
+    """"Same as `range`, but iterates range in reverse; arguments are passed
+        in the same format, so `rrange` can act as a drop-in replacement for
+        `range`.
     let num-type = (typeof a)
     let step =
         static-branch (none? c)

          
@@ 5524,8 5524,9 @@ define sugar
 #-------------------------------------------------------------------------------
 
 fn uncomma (l)
-    """"uncomma list l, wrapping all comma separated symbols as new lists
-        example:
+    """"uncomma list l, wrapping all comma separated symbols as new lists.
+
+        Usage example:
 
             :::scopes
             (uncomma '(a , b c d , e f , g h)) -> '(a (b c d) (e f) (g h))

          
@@ 5811,7 5812,7 @@ define va-split
                         'getarg args i
             `(_ (inline () largs) (inline () rargs))
 
-"""" filter all keyed values
+""""Filter all keyed values.
 define va-unnamed
     spice-macro
         fn "va-unnamed" (args)

          
@@ 5830,10 5831,9 @@ inline va-join (a...)
     inline (b...)
         va-append-va (inline () b...) a...
 
-""""A `Generator` that iterates through all integer values starting
-    at 0. This generator does never terminate; when it exceeds the maximum
-    integer value, it overflows and continues with the minimum integer value
-    of that type.
+""""A `Generator` that iterates through all integer values starting at 0. This
+    generator never terminates; when it exceeds the maximum integer value, it
+    overflows and continues with the minimum integer value of that type.
 inline infinite-range (T)
     let T =
         static-branch (none? T)

          
@@ 6991,7 6991,7 @@ sugar typedef+ (T body...)
         [('tag `body anchor)]
         this-type
 
-""""a type declaration syntax; when the name is a string, the type is declared
+""""A type declaration syntax; when the name is a string, the type is declared
     at runtime.
 sugar typedef (name body...)
     let declaration? = (('typeof name) == Symbol)

          
@@ 7891,7 7891,7 @@ typedef MethodsAccessor
         :::scopes
         from (methodsof <object>) let method1 method2
 
-    now the imported methods are implicitly bound to `<object>` and can be
+    Now the imported methods are implicitly bound to `<object>` and can be
     called directly.
 spice methodsof (context)
     typedef BoundMethodsAccessor < MethodsAccessor

          
M lib/scopes/itertools.sc +34 -31
@@ 15,7 15,7 @@ using import spicetools
 # generators
 #---------------------------------------------------------------------------
 
-""""for each element in generator a, repeat generator b and return both states
+""""For each element in generator a, repeat generator b and return both states.
 inline span (a b)
     let start-a valid-a at-a next-a = ((a as Generator))
     let start-b valid-b at-b next-b = ((b as Generator))

          
@@ 60,7 60,7 @@ spice unpack-bitdim (n size...)
         _ `(expr >> S)
     sc_argument_list_new acount values
 
-""""a branchless generator that iterates multidimensional coordinates
+""""A branchless generator that iterates multidimensional coordinates.
 @@ spice-quote
 inline dim (x n...)
     let T = (typeof x)

          
@@ 73,8 73,8 @@ inline dim (x n...)
         inline (n) (unpack-dim n x n...)
         inline (n) (n + _1)
 
-""""a variant of dim optimized for power of two sizes; the dimensions are
-    specified as exponents of 2
+""""A variant of dim optimized for power of two sizes; the dimensions are
+    specified as exponents of 2.
 @@ spice-quote
 inline bitdim (x n...)
     let T = (typeof x)

          
@@ 95,7 95,7 @@ inline imap (gen f)
         next
 
 inline ipair (gen N)
-    """"generate one variadic argument from N generated arguments
+    """"Generate one variadic argument from N generated arguments.
     let N =
         static-if (none? N) 2
         else N

          
@@ 144,8 144,8 @@ inline ipair (gen N)
                         inline () (next it...)
                     range...
 
-""""when generator a is exhausted, continue with generator b
-    both generators must yield the same value type
+""""When generator a is exhausted, continue with generator b;
+    both generators must yield the same value type.
 inline join (a b)
     let start-a valid-a at-a next-a = ((a as Generator))
     let start-b valid-b at-b next-b = ((b as Generator))

          
@@ 182,12 182,14 @@ define span (spice-macro (fn (args) (rtl
 define join (spice-macro (fn (args) (rtl-multiop args `join 2)))
 
 # based on https://en.wikipedia.org/wiki/Heap%27s_algorithm
-""""Return a generator that iterates all permutations of the range from 0
-    to `n`, where `n` must be smaller than 256, and returns a vector of
-    `element-type` for each iteration. If `element-type` is omitted, the
-    default element type will be i32.
+""""*inline*{.property} `permutate-range`{.descname} (*&ensp;n element-type&ensp;*)[](#scopes.inline.permutate-range "Permalink to this definition"){.headerlink} {#scopes.inline.permutate-range}
 
-    The generator will perform `n!` iterations to complete.
+    :   Return a generator that iterates all permutations of the range from 0
+        to `n`, where `n` must be smaller than 256, and returns a vector of
+        `element-type` for each iteration. If `element-type` is omitted, the
+        default element type will be i32.
+
+        The generator will perform `n!` iterations to complete.
 @@ memo
 inline permutate-range (n element-type)
     static-assert (n < 256) "permutation vector too large"

          
@@ 236,7 238,7 @@ inline permutate-range (n element-type)
 #---------------------------------------------------------------------------
 
 inline collect (coll)
-    """"run collector until full and return the result
+    """"Run collector until full and return the result.
     let start valid? at collect = ((coll as Collector))
     let start... = (start)
     loop (state... = start...)

          
@@ 246,7 248,7 @@ inline collect (coll)
             break (at state...)
 
 inline each (generator collector)
-    """"fold output from generator into collector
+    """"Fold output from generator into collector.
     inline _each (collector)
         let c-init c-valid? c-at c-collect = ((collector as Collector))
         let g-start g-valid? g-at g-next = ((generator as Generator))

          
@@ 303,7 305,7 @@ spice compose (collector...)
             collector...
 
 inline cat (coll)
-    """"treat input as a generator and forward its arguments individually
+    """"Treat input as a generator and forward its arguments individually.
     inline _cat (coll)
         let init valid? at collect = ((coll as Collector))
         Collector init valid? at

          
@@ 327,7 329,7 @@ inline ->> (generator collector...)
                 collector...
 
 inline flatten (coll)
-    """"collect variadic input as individual single items
+    """"Collect variadic input as individual single items.
     inline _flatten (coll)
         let init valid? at collect = ((coll as Collector))
         Collector init valid? at

          
@@ 384,9 386,9 @@ inline limit (f coll)
     else (_limit coll)
 
 inline gate (f a b)
-    """"if f is true, collect input in a, otherwise collect in b
-        when both are full, output both
-        until then, new input for full containers is discarded
+    """"If f is true, collect input in a, otherwise collect in b. When both are
+        full, output both. Until both are full, new input for full containers
+        is discarded.
     inline _gate (b)
         let a-init a-valid? a-at a-collect = ((a as Collector))
         let b-init b-valid? b-at b-collect = ((b as Collector))

          
@@ 438,7 440,7 @@ inline filter (f coll)
     else (_filter coll)
 
 inline take (n coll)
-    """"limit collector to output n items
+    """"Limit collector to output n items.
     inline _take (coll)
         let init valid? at collect = ((coll as Collector))
         Collector

          
@@ 488,9 490,10 @@ inline cascade1 (a b)
     else (_cascade b)
 
 inline cascade (collector...)
-    """"two collectors:
-        every time a is full, b collects a and a is reset
-        when b ends, the remainder of a is collected
+    """"Two collectors:
+
+        - Every time a is full, b collects a and a is reset.
+        - When b ends, the remainder of a is collected.
     inline (coll)
         cascade1
             va-rfold none

          
@@ 502,7 505,7 @@ inline cascade (collector...)
             coll
 
 inline mux1 (c1 c2 coll)
-    """"send input into two collectors which fork the target collector
+    """"Send input into two collectors which fork the target collector.
     inline _mux (coll)
         let c1 = (c1 coll)
         let c2 = (c2 coll)

          
@@ 534,7 537,7 @@ inline mux1 (c1 c2 coll)
     else (_mux coll)
 
 inline mux (collector...)
-    """"send input into multiple collectors which each fork the target collector
+    """"Send input into multiple collectors which each fork the target collector.
     let c1 c2 c... = collector...
     static-if (none? c2) c1
     else

          
@@ 544,8 547,8 @@ inline mux (collector...)
             c...
 
 inline demux (init-value f collector...)
+    """"A reducing sink for mux streams.
     let muxed = (mux collector...)
-    """"a reducing sink for mux streams
     inline _demux (coll)
         local reduced = init-value
         let sink =

          
@@ 586,7 589,7 @@ inline retain1 (mapl child coll)
     let mapl =
         static-if (none? mapl) (inline (...) ...)
         else mapl
-    """"output both child input and child output
+    """"Output both child input and child output.
     inline _retain1 (coll)
         let ch = (child coll)
         let init1 valid1? at1 collect1 = ((ch as Collector))

          
@@ 606,10 609,10 @@ inline retain1 (mapl child coll)
     static-if (none? coll) _retain1
     else (_retain1 coll)
 
-""""feeds the input through a composition of collectors and feeds the
-    input along with the composition output to the next collector.
-    if mapl is not none, it allows to specify the portion of the input that
-    will be passed to the end point.
+""""Feeds the input through a composition of collectors and feeds the input
+    along with the composition output to the next collector. If mapl is not
+    none, it allows specifying the portion of the input that will be passed
+    to the end point.
 @@ spice-quote
 inline retain (mapl ...)
     retain1 mapl (compose ...)

          
M lib/scopes/property.sc +1 -1
@@ 6,7 6,7 @@ 
 """"property
     ========
 
-    Provides a property accessor for types
+    Provides a property accessor for types.
 
 typedef Property
 

          
M lib/scopes/testing.sc +7 -6
@@ 167,7 167,7 @@ sugar test-compiler-error (args...)
 
 """"A feature matrix that tests 2-d permutations
 
-    usage:
+    Usage:
 
         :::scopes
         features    B1  B2  B3 ...

          
@@ 176,7 176,7 @@ sugar test-compiler-error (args...)
             A2      N   Y   N
             A3      Y   N   Q
 
-    will expand to:
+    Will expand to:
 
         :::scopes
         do

          
@@ 208,12 208,13 @@ sugar features (args...)
 
 run-stage;
 
-""""this type is used for discovering leaks and double frees. It holds an integer
-    value as well as a pointer to a single reference on the heap which is 1 as
-    long as the object exists, otherwise 0. The refcount is leaked in
+""""This type is used for discovering leaks and double frees. It holds an
+    integer value as well as a pointer to a single reference on the heap which
+    is 1 as long as the object exists, otherwise 0. The refcount is leaked in
     order to not cause segfaults when a double free occurs.
 
-    In addition, a global refcounter is updated which can be checked for balance.
+    In addition, a global refcounter is updated which can be checked for
+    balance.
 typedef One :: (tuple i32 (mutable pointer i32))
     global _refcount = 0