我創建的有理數(INT * INT)的結構及我的功能之一是: fun diff ((n, d), (n', d')) = let val (top, bot) = sum ((n, d), (~n', d'))
in
(top/gcd(top, bot), bot/gcd(top, bot))
end
GCD給了我最
我正在嘗試使用SML比較目錄中的文件。使用TextIO庫相當容易,但我需要在比特級別比較文件。那就是二進制比較。我正在使用類似於此的功能: fun listDir (s) = let
fun loop (ds) = (case OS.FileSys.readDir (ds)
of "" => [] before OS.FileSys.closeDir (ds)
|