Skip to content

Commit

Permalink
Update Recursion library
Browse files Browse the repository at this point in the history
  • Loading branch information
julianmendez committed Apr 27, 2024
1 parent ed63e27 commit 3097288
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions translator/src/main/resources/lib/soda/lib/Package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ object OptionSDBuilder {
*/

object Succ_ {
def apply (n : Int) : Int = n + 1
def unapply (n : Int) : Option [Int] =
if (n <= 0) None else Some (n - 1)
}
Expand Down
1 change: 1 addition & 0 deletions translator/src/main/resources/lib/soda/lib/Recursion.soda
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

directive scala
object Succ_ {
def apply (n : Int) : Int = n + 1
def unapply (n : Int) : Option [Int] =
if (n <= 0) None else Some (n - 1)
}
Expand Down
1 change: 1 addition & 0 deletions translator/src/main/scala/soda/lib/Package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ object OptionSDBuilder {
*/

object Succ_ {
def apply (n : Int) : Int = n + 1
def unapply (n : Int) : Option [Int] =
if (n <= 0) None else Some (n - 1)
}
Expand Down
1 change: 1 addition & 0 deletions translator/src/main/scala/soda/lib/Recursion.soda
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

directive scala
object Succ_ {
def apply (n : Int) : Int = n + 1
def unapply (n : Int) : Option [Int] =
if (n <= 0) None else Some (n - 1)
}
Expand Down

0 comments on commit 3097288

Please sign in to comment.