map
この関数を使用して、たとえばペンスからポンドへの変換を取得する必要があります。ばかげた質問でごめんなさい..でも私は初心者です。
del :: Int -> Float
del x = ( fromIntegral x ) / 100
pounds :: [Int] -> [Float]
pounds = map del
そして、私はこのエラーを受け取ります。
*Main> pounds 45
<interactive>:90:8:
No instance for (Num [Int])
arising from the literal `45'
Possible fix: add an instance declaration for (Num [Int])
In the first argument of `pounds', namely `45'
In the expression: pounds 45
In an equation for it': it = pounds 45