How to convert ints to strings in SML recursively?

后端 未结 0 1962
日久生厌
日久生厌 2021-02-14 03:15

I made a very small program which takes an int and converts it into string in SML:

fun int2str i =
    if i < 0 then "~" ^ Int.toString (~i) else Int         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题