Hi
I am a newbie with F# and has been creating a function which calculates power of n for any integer. I wanted to result to hold very large values like 5^5000.
I created following function for the same
open Microsoft.FSharp.Math.BigInt
let rec Power (x:bigint) (y:bigint) = if y=of_int 1 then x else x* Power of_int x of_int y-1
However, when compiled i am getting following error.
Error 1 This value is not a function and cannot be applied
Error 2 This value is not a function and cannot be applied
I have "bolded" the place where the error is being shown.
If i put a braces around the arguements of power, i am getting following error.
Error 1 Expecting a type supporting the operator '*' but given a function type. Are you missing an argument to a function?
Can any one please guide me ?? Also can anyone please tell how i can accept parameters as int and return as bigint ??
Thanks n Regards
Anu Viswan