Reputation: 53
Given these two functions:
drex :: (Int,Int) -> [[String]] -> String
rcgmove :: String -> (Int,Int) -> (Int,Int)
When called like this:
drex ((rcgmove b (x,y)) xs)
Is an error, because xs
is rcgmove
's third argument. However, I want xs
to be drex
s second argument. How do I do this?
Upvotes: 1
Views: 1050
Reputation: 35089
xs pretends like rcgmove function's third argument, and gives error. However I want xs to be drex function's second argument as you can guess. How can I give xs as drex's second argument?
Just remove the outermost parentheses:
drex (rcgmove b (x,y)) xs
Upvotes: 4