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

feat(#201): remove empty lines and sparse decorations #202

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/main/eo/org/eolang/collections/hash-code-of.eo
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@
index.plus 1
bytes
zero-as-bytes

0.as-bytes > zero-as-bytes!

rec-hash-code > @
1
0
Expand Down
1 change: 0 additions & 1 deletion src/main/eo/org/eolang/collections/list.eo
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@
[i] > head
i > index!
0 > zero!

switch > @
*
index.eq zero
Expand Down
5 changes: 1 addition & 4 deletions src/main/eo/org/eolang/collections/map.eo
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
# or simplify them. Also we should remove rebuild method in multimap file
[m] > map
memory 0 > elements-amount
elements-amount > size

# Returns list of all keys in multimap
[] > keys
Expand Down Expand Up @@ -63,10 +64,6 @@
x
key

# Returns amount of elements in multimap
[] > size
elements-amount > @

# Returns the new map with added object
# Replaces if there was one before
[key value] > with
Expand Down
5 changes: 1 addition & 4 deletions src/main/eo/org/eolang/collections/multimap.eo
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

[m] > multimap
memory 0 > elements-amount
elements-amount > size

# Returns list of all keys in multimap
[] > keys
Expand All @@ -40,10 +41,6 @@
[curr]
curr.at 0 > @

# Returns amount of elements in multimap
[] > size
elements-amount > @

[arr] > concat-all-arrays
reduced. > @
list
Expand Down
11 changes: 4 additions & 7 deletions src/main/eo/org/eolang/collections/range.eo
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,15 @@
[acc current last] > append
if. > @
current.lt last
[]
append > @
acc.with current
current.next
last
append
acc.with current
current.next
last
acc

if. > @
start.lt end
append
* start
start.next
end
*

47 changes: 23 additions & 24 deletions src/main/eo/org/eolang/collections/set.eo
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,29 @@
if. > @!
lst.is-empty
lst
[]
reduced. > @
at.
reducedi.
lst
*
map *
list *
[acc item index]
acc.at 0 > mp!
if. > @
not.
eq.
length.
mp.found item
0
acc
*
mp.with item 1
(acc.at 1).with index
1
list *
[acc index]
acc.with (lst.at index) > @
reduced.
at.
reducedi.
lst
*
map *
list *
[acc item index]
acc.at 0 > mp!
if. > @
not.
eq.
length.
mp.found item
0
acc
*
mp.with item 1
(acc.at 1).with index
1
list *
[acc index]
acc.with (lst.at index) > @

[x] > with
set > @
Expand Down
2 changes: 0 additions & 2 deletions src/test/eo/org/eolang/collections/range-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@
*
(@.at 0).plus 1
(@.at 1).plus 1

range > rng!
comparable-pair
* 1 2
* 5

assert-that > @
list rng
$.equal-to
Expand Down
Loading