Skip to content

Commit

Permalink
Merge pull request #3482 from objectionary/3481
Browse files Browse the repository at this point in the history
less references to `\rho`
  • Loading branch information
yegor256 authored Nov 10, 2024
2 parents 57493e7 + 2fe1f1d commit 91458c7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions eo-runtime/src/main/eo/org/eolang/i16.eo
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,24 @@

# Returns `true` if `$` < `x`.
# Here `x` must be an `i16` object.
^.as-i32.lt x.as-i16.as-i32 > [x] > lt
as-i32.lt x.as-i16.as-i32 > [x] > lt

# Returns `true` if `$` <= `x`.
# Here `x` must be an `i16` object.
^.as-i32.lte x.as-i16.as-i32 > [x] > lte
as-i32.lte x.as-i16.as-i32 > [x] > lte

# Returns `true` if `$` > `x`.
# Here `x` must be an `i16` object.
^.as-i32.gt x.as-i16.as-i32 > [x] > gt
as-i32.gt x.as-i16.as-i32 > [x] > gt

# Returns `true` if `$` >= `x`.
# Here `x` must be an `i16` object.
^.as-i32.gte x.as-i16.as-i32 > [x] > gte
as-i32.gte x.as-i16.as-i32 > [x] > gte

# Multiplication of `$` and `x`.
# Here `x` must be an `i16` object.
[x] > times
(^.as-i32.times x.as-i16.as-i32).as-bytes > bts
(as-i32.times x.as-i16.as-i32).as-bytes > bts
bts.slice 0 2 > left
bts.slice 2 2 > right
if. > @
Expand All @@ -77,7 +77,7 @@
# Sum of `$` and `x`.
# Here `x` must be an `i16` object.
[x] > plus
(^.as-i32.plus x.as-i16.as-i32).as-bytes > bts
(as-i32.plus x.as-i16.as-i32).as-bytes > bts
bts.slice 0 2 > left
bts.slice 2 2 > right
if. > @
Expand All @@ -91,14 +91,14 @@

# Subtraction between `$` and `x`.
# Here `x` must be an `i16` object.
^.plus x.as-i16.neg > [x] > minus
plus x.as-i16.neg > [x] > minus

# Quotient of the division of `$` by `x`.
# Here `x` must be an `i16` object.
# An `error` is returned if or `x` is equal to 0.
[x] > div
x.as-i16 > x-as-i16
(^.as-i32.div x-as-i16.as-i32).as-bytes > bts
(as-i32.div x-as-i16.as-i32).as-bytes > bts
bts.slice 0 2 > left
bts.slice 2 2 > right
00-00 > zero
Expand All @@ -107,7 +107,7 @@
error
sprintf
"Can't divide %d by i16 zero"
* ^.as-i32.as-i64.as-number
* as-i32.as-i64.as-number
if.
or.
left.eq zero
Expand Down
4 changes: 2 additions & 2 deletions eo-runtime/src/main/eo/org/eolang/tuple.eo
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

# Obtain the length of the tuple.
[] > length
^.head.length.plus 1 > len!
head.length.plus 1 > len!
number len > @

# Take one element from the tuple, at the given position.
Expand All @@ -61,7 +61,7 @@

[tup len] > at-fast
if. > @
(len.plus -1).gt ^.index
(len.plus -1).gt index
^.at-fast
tup.head
len.plus -1
Expand Down
4 changes: 2 additions & 2 deletions eo-runtime/src/main/eo/org/eolang/while.eo
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
# Attention! The object is for internal usage only. Please don't use
# the object programmatically outside of `while` object.
[index] > loop
^.body index > current
body index > current
if. > @
(^.condition (index.plus 1)).as-bool
(condition (index.plus 1)).as-bool
seq
*
current
Expand Down

0 comments on commit 91458c7

Please sign in to comment.