|
|
@ -31,14 +31,12 @@ insert(Num, Ds) -> |
|
|
|
read(0, Ds, _V) -> |
|
|
|
Ds; |
|
|
|
read(Num, Ds, _V) -> |
|
|
|
V = |
|
|
|
case Ds of |
|
|
|
case Ds of |
|
|
|
#{Num := Value} -> |
|
|
|
Value; |
|
|
|
read(Num - 1, Ds, Value); |
|
|
|
_ -> |
|
|
|
undefined |
|
|
|
end, |
|
|
|
read(Num - 1, Ds, V). |
|
|
|
read(Num - 1, Ds, undefined) |
|
|
|
end. |
|
|
|
|
|
|
|
update(0, Ds) -> |
|
|
|
Ds; |
|
|
|