Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
julianmendez committed Mar 16, 2024
1 parent 9702e47 commit df5a527
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class FiboExampleInSoda
_plus (a : NonNegative) (b : NonNegative) : NonNegative =
NonNegative .mk (a .v + b .v)

_monus1 (a : NonNegative) : NonNegative =
if a .v > 0
then NonNegative .mk (a .v - 1)
else a
_monus1 (a : NonNegative) : NonNegative =
if a .v > 0
then NonNegative .mk (a .v - 1)
else a

_rec (m : NonNegative) (a : NonNegative) (b : NonNegative) : NonNegative =
if m .v == 0 then a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ trait FiboExampleInSoda
private def _plus (a : NonNegative) (b : NonNegative) : NonNegative =
NonNegative .mk (a .v + b .v)

private def _monus1 (a : NonNegative) : NonNegative =
if ( a .v > 0
) NonNegative .mk (a .v - 1)
else a
private def _monus1 (a : NonNegative) : NonNegative =
if ( a .v > 0
) NonNegative .mk (a .v - 1)
else a

private def _rec (m : NonNegative) (a : NonNegative) (b : NonNegative) : NonNegative =
if ( m .v == 0 ) a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ trait FiboExampleInSoda
private def _plus (a : NonNegative) (b : NonNegative) : NonNegative =
NonNegative .mk (a .v + b .v)

private def _monus1 (a : NonNegative) : NonNegative =
if ( a .v > 0
) NonNegative .mk (a .v - 1)
else a
private def _monus1 (a : NonNegative) : NonNegative =
if ( a .v > 0
) NonNegative .mk (a .v - 1)
else a

private def _rec (m : NonNegative) (a : NonNegative) (b : NonNegative) : NonNegative =
if ( m .v == 0 ) a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ class FiboExampleInSoda
_plus (a : NonNegative) (b : NonNegative) : NonNegative =
NonNegative .mk (a .v + b .v)

_monus1 (a : NonNegative) : NonNegative =
if a .v > 0
then NonNegative .mk (a .v - 1)
else a
_monus1 (a : NonNegative) : NonNegative =
if a .v > 0
then NonNegative .mk (a .v - 1)
else a

_rec (m : NonNegative) (a : NonNegative) (b : NonNegative) : NonNegative =
if m .v == 0 then a
Expand Down

0 comments on commit df5a527

Please sign in to comment.