Learning Haskell is killing me. If I am going to write a function that takes an array of arrays of order-able elements, and outputs the same thing, how do I do that?
I try:
main = testfn [[1],[2]]
testfn :: (Ord a) => [[a]] -> [[a]]
testfn x = x
But the message I get is:
Couldn't match expected type 'IO t0' with actual type '[[a0]]' In the expression: main When checking the type of the function 'main'
[a]
is a list, not an array. The difference is quite important; haskell has both, and they have very different performance implications – bdonlan