Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
#87 - removed unnecessary parenthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
Graur committed Dec 26, 2022
1 parent fcf45bc commit 046c5c6
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ SOFTWARE.
<keepBinaries>
<glob>EOorg/EOeolang/EOcollections/**</glob>
</keepBinaries>
<failOnWarning>true</failOnWarning>
</configuration>
</execution>
<execution>
Expand Down
30 changes: 15 additions & 15 deletions src/main/eo/org/eolang/collections/list.eo
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,28 @@
arr
a
rec-reduced
(* a 0)
* a 0
f
arr

[acc-index func carr] > rec-reduced
(acc-index.at 0) > acc
(acc-index.at 1) > index
acc-index.at 0 > acc
acc-index.at 1 > index
seq > @
func > new-acc!
acc
index
(carr.at index)
carr.at index
if.
((index.plus 1).eq (carr.length))
(index.plus 1).eq (carr.length)
new-acc
rec-reduced
*
func
acc
index
(carr.at index)
(index.plus 1)
carr.at index
index.plus 1
func
carr

Expand Down Expand Up @@ -185,13 +185,13 @@
memory 0 > i
memory 0 > j
while. > sorting-process!
(i.lt (res.length))
i.lt (res.length)
[iter-i]
seq > @
j.write 0
i.write (i.plus 1)
while.
((j.plus 1).lt (res.length))
(j.plus 1).lt (res.length)
[iter-j]
seq > @
if.
Expand Down Expand Up @@ -231,14 +231,14 @@
arr
list *
rec-filtered
(* 0 arr)
* 0 arr
f
list *

[index-carr func new-list] > rec-filtered
(index-carr.at 0) > index
(index-carr.at 1) > carr
(carr.at index) > item
index-carr.at 0 > index
index-carr.at 1 > carr
carr.at index > item
seq > @
func > acc!
item
Expand All @@ -250,10 +250,10 @@
new-list.with item
new-list
if.
((index.plus 1).eq (carr.length))
(index.plus 1).eq (carr.length)
filt-list
rec-filtered
(* (index.plus 1) carr)
* (index.plus 1) carr
func
filt-list

Expand Down
20 changes: 10 additions & 10 deletions src/main/eo/org/eolang/collections/multimap.eo
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
arr
*
[a x]
(a.with ((x.at 0).as-hash)) > @
a.with (x.at 0).as-hash > @

# Returns the new map with added object
[key value] > with
Expand All @@ -83,7 +83,7 @@
if. > @
eq.
key
(x.at 0)
x.at 0
a.with (x.at 1)
a

Expand All @@ -107,7 +107,7 @@
if. > @
eq.
key
(x.at 0)
x.at 0
a
a.with x

Expand All @@ -120,8 +120,8 @@
[x i]
mod. > new-index!
number
(harr.at i)
(arr.length)
harr.at i
arr.length
comparable-pair (* new-index x) > @
sorted. > sorted-pairs!
list
Expand All @@ -134,7 +134,7 @@
[a i x]
if. > @
gte.
(x.at 0)
x.at 0
curr-hash
seq
curr-hash.write (x.at 0)
Expand All @@ -159,10 +159,10 @@
[arr sz] > fill-to-size
if. > @
gte.
(arr.length)
arr.length
sz
arr
^.fill-to-size (arr.with (*)) sz
^.fill-to-size (arr.with *) sz

# @todo #15:30min We have to make this function faster.
# expectation of the number of elements with a certain
Expand All @@ -181,11 +181,11 @@
i
from-index
eq.
(x.at 0)
x.at 0
hash
with.
a
(x.at 1)
x.at 1
a

[harr arr] > rebuild /array
Expand Down
4 changes: 2 additions & 2 deletions src/test/eo/org/eolang/collections/multimap-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@
[x i]
mod. > new-index!
QQ.math.number
(harr.at i)
(arr.length)
harr.at i
arr.length
(multimap.rebuilded.comparable-pair) (* new-index x) > @
sorted. > sorted-pairs!
list
Expand Down

0 comments on commit 046c5c6

Please sign in to comment.