Rerouted (regenerated, verified). Same repository and tag, but GitHub now builds the zip with different bytes, so it no longer matches the SHA-1 package.elm-lang.org recorded. The Lamdera package server serves a copy recovered from https://github.com/kudzu-forest/elm-random-tree.
What we checked: Rebuilt with git archive from commit ce921ee5bf92 of https://github.com/kudzu-forest/elm-random-tree (zip prefix kudzu-forest-elm-random-tree-ce921ee/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 270e255f44195adf4d02408b8a27294f1c8206ad.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/kudzu-forest/elm-random-tree/zipball/3.0.0/
This module provides data structure subjected to random choice of elements in uniform probability.
Tree in this module
take, remove, and filter) all return Maybe (Tree a) just in case all the elements are deleted.fromList takes one heading element and tailing list.(similar with Random.uniform or Random.weighted.)member and remove is O(N).remove or filter is called, so when I say "The time complexity is O(log(N))", N denotes the maximal size in the history of the tree so far.Inserts all elements of given list into the tree.
Removes any number of elements which fails to passes the test function given as the first parameter.
Removes any number of elements which is the same as the first parameter from the second parameter.
Random generator that generates one of the elements conteined in Tree given as parameter.
The time complexity is O(log(N)).
Random generator that generates one of the elements conteined in Tree, paired with the rest part of the tree. For example,
take
/\
/ \
/\ /\
/\ c d e
a bgenerates
( a, Just /\ ),
/ \
/\ /\
b c d e
( b,Just /\ ),
/ \
/\ /\
a c d e
( c,Just /\ ),
/ \
/\ /\
a b d e
( d,Just /\ ),
/ \
/\ /\
a b c eor
( e,Just /\ )
/ \
/\ /\
a b c din probability of 20%. The time complexity is O(log(N)).
Random generator that replaces one data from the tree and generates a pair consisting of the removed data and resultant tree. For example,
replace x /\
/ \
/\ /\
/\ c d e
a bgenerates
( a, /\ ),
/ \
/\ /\
/\ c d e
x b
( b, /\ ),
/ \
/\ /\
/\ c d e
a x
( c, /\ ),
/ \
/\ /\
/\ x d e
a b
( d, /\ ),
/ \
/\ /\
/\ c x e
a bor
( e, /\ ),
/ \
/\ /\
/\ c d x
a bin probability of 20%. The time complexity is O(log(N)).
Type that represents binary tree with elements subjected to random picking up in uniform probabilities.