CharをIntに変換する方法が不思議です。 など。CharをIntに変換する
a = '\x2' -- a == 2
-- type of a should be Char
b = charToInt a -- b == 2
-- type of b should be Int
しかし、私はどのようには考え得なかった:あなたは、その整数(序)表現に文字を変換するord
機能を使用することができます/
事前に感謝
CharをIntに変換する方法が不思議です。 など。CharをIntに変換する
a = '\x2' -- a == 2
-- type of a should be Char
b = charToInt a -- b == 2
-- type of b should be Int
しかし、私はどのようには考え得なかった:あなたは、その整数(序)表現に文字を変換するord
機能を使用することができます/
事前に感謝
[hoogle](http://www.haskell.org/hoogle/?hoogle=Char+-%3E+Int)を見つけて使用してください。 –