Closed jftavira closed 5 months ago
Hi Juan, thank you for raising this issue. In 97fc16c I have:
extension (b: OS) infix def ||(c: OS) = b concat c
: indeed I meant concatenation and not logical OR.Now it should run well in:
scala-cli run prototype.worksheet.sc
Correct, I was able to run it in IntelliJ at least
I've been trying to execute prototype.worksheet.sc in Scala 3 but i'm having some errors like this one:
scala> def I2OSP(i: BigInt, len: Int): OS = Array.fill[Byte](len - i.os.length)(0) || i.os -- [E008] Not Found Error: ----------------------------------------------------- 1 |def I2OSP(i: BigInt, len: Int): OS = Array.fill[Byte](len - i.os.length)(0) || i.os | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | value || is not a member of Array[Byte] 1 error found
Is "||" the logical "OR" really the operation needed? https://www.tutorialspoint.com/scala/scala_operators.htm
Regards, Juan