mirror of
https://github.com/kanaka/mal.git
synced 2024-08-16 17:20:23 +03:00
FIX: print zero without minus
This commit is contained in:
parent
c6115098cc
commit
a2d0d6ce43
@ -2,5 +2,5 @@ fun prStr NIL = "nil"
|
||||
| prStr (SYMBOL s) = s
|
||||
| prStr (BOOL true) = "true"
|
||||
| prStr (BOOL false) = "false"
|
||||
| prStr (INT i) = if i > 0 then Int.toString i else "-" ^ (Int.toString (Int.abs i))
|
||||
| prStr (INT i) = if i >= 0 then Int.toString i else "-" ^ (Int.toString (Int.abs i))
|
||||
| prStr (LIST l) = "(" ^ (String.concatWith " " (map prStr l)) ^ ")" (* N.B. not tail recursive *)
|
||||
|
Loading…
Reference in New Issue
Block a user