Hi Lawrence,

it seems that you are trying to print your defined function. Most likely you just forgot to apply an argument to fswp. So 'fswp (1,2)' should just work fine.

Cheers,

Tobias

On 9/9/21 11:25 PM, Galaxy Being wrote:
I've got this

import Data.Tuple
fswp :: (a, b) -> (b, a)
fswp = Data.Tuple.swap

and get this 

 • No instance for (Show ((a0, b0) -> (b0, a0)))
        arising from a use of ‘print’
        (maybe you haven't applied a function to enough arguments?)
    • In a stmt of an interactive GHCi command: print it


Not sure why or what to do to correct it.


Lawrence Bottorff
Grand Marais, MN, USA

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners