haskell - Can't compile because of types when using nub, map and take -


I have found this simple task:

  bumps :: int-> (x , Y) (), (), - (int, int)] - & gt; [(Int, int]] Bumpers' bookmark listoffpp = dot (perms listOfPossiblePoints))   

(Cartesian Points)

I need all permutations And only a few (bmcount) points will be required before.

I get the following error:

  Actual type `[a0] 'can not match the expected type (expected type): [a0] - & gt; ; (Int, Int) Actual type: [a0] - & gt; [A0] In the first argument of `map 'in the return type of call to' le ', i.e.` `(leanazabomb le)' ​​'   

If you remove the type signature and ask the GHCI for the type, your problem will be clear:

  & gt; : Tea Bompless Bompless :: Eq A = & gt; Int - & gt; [A] - & gt; [[A]]   

That is, wants to return a list of bomb blast lists, while you want to return it to a plain list.

NB You did not tell us what the definition is, you must change either the type signature or the definition of the function. using perms , so I have assumed one obvious.

Comments