mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-29 17:30:11 +02:00
refactor
This commit is contained in:
@@ -10,7 +10,7 @@ function _dedup(elems, leng, buckets, eq, hash, bucket_numbers) =
|
||||
n_buckets
|
||||
]
|
||||
)
|
||||
_dedup_add(n_buckets_lt[len(n_buckets_lt) - 1], [end, elems[end]], eq, hash, bucket_numbers);
|
||||
_dedup_add(n_buckets_lt[end - 1], [end, elems[end]], eq, hash, bucket_numbers);
|
||||
|
||||
|
||||
function _dedup_add(buckets, i_elem, eq, hash, bucket_numbers) =
|
||||
|
@@ -4,4 +4,4 @@ function _shuffle(lt, indices, leng) =
|
||||
let(end = len(lt) - 1)
|
||||
end == 0 ? lt :
|
||||
let(cum = [for(i = 0, s = swap(lt, i, indices[i]); i < end; i = i + 1, s = swap(s, i, indices[i])) s])
|
||||
swap(cum[len(cum) - 1], end, indices[end]);
|
||||
swap(cum[end - 1], end, indices[end]);
|
@@ -10,4 +10,4 @@ function _hashmap(kv_lt, leng, buckets, b_numbers, eq, hash) =
|
||||
n_buckets
|
||||
]
|
||||
)
|
||||
_hashmap_put(n_buckets_lt[len(n_buckets_lt) - 1], b_numbers, kv_lt[end][0], kv_lt[end][1], eq, hash);
|
||||
_hashmap_put(n_buckets_lt[end - 1], b_numbers, kv_lt[end][0], kv_lt[end][1], eq, hash);
|
@@ -10,6 +10,6 @@ function _hashset(lt, leng, buckets, b_numbers, eq, hash) =
|
||||
n_buckets
|
||||
]
|
||||
)
|
||||
_hashset_add(n_buckets_lt[len(n_buckets_lt) - 1], b_numbers, lt[end], eq, hash);
|
||||
_hashset_add(n_buckets_lt[end - 1], b_numbers, lt[end], eq, hash);
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user