RosettaCodeData/Task/Even-or-odd/Nu/even-or-odd.nu
2024-10-16 18:07:41 -07:00

7 lines
94 B
Text

def is-even [x: int] {
($x bit-and 1) == 0
}
def is-odd [x: int] {
($x bit-and 1) == 1
}