From 124c67645cb6f1b9f06d7104c5398fa4732e2f25 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 20 Jun 2017 10:40:07 -0700 Subject: 3934 --- html/070table.mu.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'html/070table.mu.html') diff --git a/html/070table.mu.html b/html/070table.mu.html index 603e9997..c5d0c6ac 100644 --- a/html/070table.mu.html +++ b/html/070table.mu.html @@ -105,7 +105,7 @@ if ('onhashchange' in window) { 43 44 container table:_key:_value [ 45 length:num - 46 capacity:num + 46 capacity:num 47 data:&:@:table-row:_key:_value 48 ] 49 @@ -115,12 +115,12 @@ if ('onhashchange' in window) { 53 value:_value 54 ] 55 - 56 def new-table capacity:num -> result:&:table:_key:_value [ + 56 def new-table capacity:num -> result:&:table:_key:_value [ 57 local-scope 58 load-ingredients 59 result <- new {(table _key _value): type} - 60 data:&:@:table-row:_key:_value <- new {(table-row _key _value): type}, capacity - 61 *result <- merge 0/length, capacity, data + 60 data:&:@:table-row:_key:_value <- new {(table-row _key _value): type}, capacity + 61 *result <- merge 0/length, capacity, data 62 ] 63 64 # todo: tag results as /required so that call-sites are forbidden from ignoring them @@ -130,8 +130,8 @@ if ('onhashchange' in window) { 68 load-ingredients 69 hash:num <- hash key 70 hash <- abs hash - 71 capacity:num <- get *table, capacity:offset - 72 _, hash-key:num <- divide-with-remainder hash, capacity + 71 capacity:num <- get *table, capacity:offset + 72 _, hash-key:num <- divide-with-remainder hash, capacity 73 hash-key <- abs hash-key # in case hash overflows from a double into a negative integer inside 'divide-with-remainder' above 74 table-data:&:@:table-row:_key:_value <- get *table, data:offset 75 x:table-row:_key:_value <- index *table-data, hash-key @@ -147,8 +147,8 @@ if ('onhashchange' in window) { 85 load-ingredients 86 hash:num <- hash key 87 hash <- abs hash - 88 capacity:num <- get *table, capacity:offset - 89 _, hash-key:num <- divide-with-remainder hash, capacity + 88 capacity:num <- get *table, capacity:offset + 89 _, hash-key:num <- divide-with-remainder hash, capacity 90 hash-key <- abs hash-key # in case hash overflows from a double into a negative integer inside 'divide-with-remainder' above 91 table-data:&:@:table-row:_key:_value <- get *table, data:offset 92 x:table-row:_key:_value <- index *table-data, hash-key -- cgit 1.4.1-2-gfad0