9 lines
149 B
Mojo
9 lines
149 B
Mojo
def checked(n: Int) raises -> Int:
|
|
if n < 0:
|
|
raise Error("negative reading")
|
|
return n
|
|
|
|
|
|
def main():
|
|
print("value:", checked(-1))
|