~statianzo/sevenlangs

sevenlangs/io/divbyzero.io -rw-r--r-- 169 bytes
2fcd4511Jason Staten day one logic style 2 years ago
                                                                                
1
2
3
4
5
6
7
8
# Change divide by 0 to be 0 instead of inf
Number div := Number getSlot("/")
Number / = method(den,
  self println
  if(den == 0, 0, div(den))
)
x := (5 / 0)
x println