Splitting an integer list into two lists. One for even elements and one for odd elements. SML

后端 未结 0 1869
逝去的感伤
逝去的感伤 2021-02-13 10:11
fun readlist is l (NONE) = ([]; TextIO.closeIn; l)
| readlist is l (SOME(s)) = 

  let
        val i = valOf(Int.fromString(s)) 
  in
        readlist is (l @ [i])(TextI         


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