Error F #: this value is not a function and cannot be applied

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 get the error F #: This value is not a function and cannot be applied.

valList is a sequence of tuples int and bool, and GetVal takes int bool int int and returns int. where alphaF betaF are mutable variables.

+6
source share
2 answers

Or you could change the signature of GetVal to not pass the tuple - like this:

 let GetVal i isMin al be = 

i, isMin, al, and be are called currency parameters. You can find more details here in the section "Partial use of arguments". I would post a direct link, but it seems not.

+4
source

Your GetVal function takes arguments (a,b,c,d) while you call it with arguments with the abcd map

Something like this should work

 yield (GetVal (i, (not isMin), alphaF, betaF) , not isMin) 
+2
source

Source: https://habr.com/ru/post/955292/


All Articles