diff options
Diffstat (limited to 'html/070table.mu.html')
-rw-r--r-- | html/070table.mu.html | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/html/070table.mu.html b/html/070table.mu.html index 9cc6e3e1..6d9b3e0c 100644 --- a/html/070table.mu.html +++ b/html/070table.mu.html @@ -35,6 +35,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color <span class="Comment"># A table is like an array, except that you can index it with arbitrary types</span> <span class="Comment"># and not just non-negative whole numbers.</span> +<span class="Comment"># incomplete; doesn't handle hash conflicts</span> + <span class="muScenario">scenario</span> table-read-write [ <span class="Constant">local-scope</span> tab:&:table:num:num <span class="Special"><-</span> new-table<span class="Constant"> 30</span> @@ -93,6 +95,8 @@ body { font-size: 12pt; font-family: monospace; color: #eeeeee; background-color *result <span class="Special"><-</span> merge <span class="Constant">0/length</span>, capacity, data ] +<span class="Comment"># todo: tag results as /required so that call-sites are forbidden from ignoring them</span> +<span class="Comment"># then we could handle conflicts simply by resizing the table</span> <span class="muRecipe">def</span> put-index table:&:table:_key:_value, key:_key, value:_value<span class="muRecipe"> -> </span>table:&:table:_key:_value [ <span class="Constant">local-scope</span> <span class="Constant">load-ingredients</span> |