mirror of
https://github.com/unisonweb/unison.git
synced 2024-10-26 11:07:48 +03:00
17 lines
415 B
Plaintext
17 lines
415 B
Plaintext
--The expression in red needs the {𝛆} ability, but this location only has access to the {𝛆} ability,
|
|
--
|
|
-- 8 | odd n = if n == 1 then true else even2 (drop n 1)
|
|
|
|
use Universal ==
|
|
|
|
even : Nat -> Boolean
|
|
even n = if n == 0 then true else odd (drop n 1)
|
|
|
|
odd : Nat -> Boolean
|
|
odd n = if n == 1 then true else even2 (drop n 1)
|
|
|
|
even2 = even
|
|
|
|
increment : Nat -> Nat -- signature is optional
|
|
increment n = n + 1
|