I tried F# under command line, it doesn't recognize function definition
> let ref f n=
- if(n<=2)then 1
- else f(n-1)+f(n-2)
- ;;
val ref : f:(int -> int) -> n:int -> int
> printf "%i" (f 10)
- ;;
printf "%i" (f 10)
-------------^
stdin(9,14): error FS0039: The value or constructor 'f' is not defined
Question: any error in my program? I copied and pasted the definition and usage of f into visual studio's F# project, it runs OK.
But Why command line fails?