私はこの単純な機能を持っています:
bombplaces::Int->[(Int,Int)]->[(Int,Int)]
bombplaces bombCount listOfPossiblePoints = nub (map (take bombCount) (perms listOfPossiblePoints))
爆弾は (x,y) (デカルト ポイント)
すべての順列を取得し、最初の数 (bombCount) ポイントのみを取得する必要があります。
次のエラーが表示されます。
Couldn't match expected type `(Int,Int)' with actual type `[a0]'
Expected type: [a0] -> (Int,Int)
Actual type: [a0] -> [a0]
In the return type of a call of `take'
In the first argument of `map', namely `(take liczbaBomb)'