How can I execute F# function in the interactive window?
If I create a .fsx file and type following code:
open System
let parseTitle (line : string) =
let startIndex = line.LastIndexOf('(')+1
let endIndex = line.LastIndexOf(')')
line.Substring(startIndex,endIndex-startIndex-1)
let testTitle = "The Possessed (The Devils) (Fyodor Dostoyevsky)"
parseTitle testTitle
Then select it all and press Alt+Enter. Nothing happens. When I set the cursor to the last line and press Alt+Enter I get following error:
error FS0039: The value or constructor 'parseTitle' is not defined
What am I doing wrong?
Alt+'.Alt+Entersends the selected text to FSI.Alt+'sends the current line.