I'm on linux and I'd like to use an interactive command line repl for F#.
For example, like the node repl.
What options are there?
Rather than typing directly into a REPL, I recommend creating an F# script file (.fsx) in an editor with F# support, e.g. Visual Studio Code. Then you can type script code with the usual benefits type-checking and auto-completions, and just select sections of code and send them to FSI (F# Interactive), usually by pressing Alt-Enter.
TheQuickBrownFox has a good suggestion, but sometimes I find it's easier to type a quick bit of test code into an actual REPL rather than editing an .fsx file in VS Code. The F# REPL is available with the fsharpi
command. It's part of the fsharp
package (at least on Debian-based systems) so you should already have it installed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With