JetBrains Rider includes a Read–Eval–Print Loop (REPL), which lets you experiment with F# code without compiling it.
To start a new F# Interactive session
Select a block of code in the editor and press Ctrl+\ or alternatively, press Alt+Enter and then choose Send selection to F# interactive.
JetBrains Rider will start a new interactive session in a new tab of the Run window and send the selected code to this session. If a F# interactive session is already running, the selected code will be appended to this session.
Choosefrom the menu.
In this case, JetBrains Rider will open an empty interactive session and reset the current F# interactive session if it is already running. You can also clear the current session at any time by clicking Reset on the toolbar.
As soon as the F# Interactive is started, you can write any F# expressions and evaluate them by pressing Enter.
F# Interactive will attempt to compile your code and execute it if successful. Otherwise the interpreter will return the error messages.
All expressions that you execute during the session are recorded in history. To find a previously executed statement, use the Up/Down buttons or copy any recently executed command:
To have the copied command executed at once, uncheck Copy recent commands to Interactive editor on the page of JetBrains Rider settings (Ctrl+Alt+S).