Reputation: 1388
let GetVal (i,isMin,al, be)=
let b = new Board(board)
if b.SetBoardBool(i) then this.MinMaxAlphaBeta(b, isMin, al, be)
else -2
let valList = seq{
for i =0 to 8 do
yield (GetVal i (not isMin) alphaF betaF , not isMin)
}
I am getting an F# error saying: This value is not a function and cannot be applied.
valList is sequence of tuples of int and bool and GetVal takes int bool int int and returns int. where alphaF betaF are mutable variables.
Upvotes: 6
Views: 6524
Reputation: 15293
Or you could change the signature of GetVal to not pass a tuple--like this:
let GetVal i isMin al be =
i, isMin, al, and be are called curried parameters. You can find more detail here under the topic "Partial Application of Arguments." I would post a direct link but there doesn't seem to be one.
Upvotes: 4
Reputation: 25516
Your GetVal
function takes tupled arguments (a,b,c,d)
whilst you call it with curried arguments a b c d
Something like this should work
yield (GetVal (i, (not isMin), alphaF, betaF) , not isMin)
Upvotes: 2