Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Jun 13, 2024
2 parents c5bbe04 + f35216e commit c66f07f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 179 deletions.
19 changes: 18 additions & 1 deletion eo-runtime/src/main/eo/org/eolang/seq.eo
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,21 @@

# The object, when being dataized, dataizes all provided
# "steps" (except the last one) and returns the last one.
[steps] > seq /?
[steps] > seq
if. > @
steps.length.eq 0
true
loop 0
steps.length.minus 1 > max-len!

[index] > loop
if. > @
and.
index.lt ^.max-len
or.
(dataized (steps.at index)).as-bool
true
^.loop
index.plus 1
steps.at index

91 changes: 0 additions & 91 deletions eo-runtime/src/main/java/EOorg/EOeolang/EOseq.java

This file was deleted.

18 changes: 18 additions & 0 deletions eo-runtime/src/test/eo/org/eolang/seq-tests.eo
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,21 @@
m.put (m.as-int.plus 1)
m
1

# Test.
[] > seq-calculates-and-returns
eq. > @
1
seq
*
0
1

# Test.
[] > seq-calculates-and-returns-object
eq. > @
"Hello!"
seq
*
0
"Hello!"
87 changes: 0 additions & 87 deletions eo-runtime/src/test/java/EOorg/EOeolang/EOseqTest.java

This file was deleted.

0 comments on commit c66f07f

Please sign in to comment.