3
在哈斯克尔源toUpper展望:了解Haskell的`toUpper`
toUpper c = chr (fromIntegral (towupper (fromIntegral (ord c))))
...
foreign import ccall unsafe "u_towupper"
towupper :: CInt -> CInt
什么是chr
含义,以及u_towupper
?我对foreign import ccall unsafe
也很好奇。 Haskell源实际上是变异的,因此unsafe
?