10 lines
136 B
Plaintext
Raw Normal View History

2024-07-28 13:42:51 +00:00
main() {
2024-07-31 13:24:21 +00:00
assert neg(-1) == 1
assert neg(1) == -1
assert neg(-256) == 256
assert neg(256) == -256
2024-07-28 13:42:51 +00:00
}
2024-08-05 16:47:24 +00:00
neg(x Int) -> Int {
2024-07-28 13:42:51 +00:00
return -x
}