Tag Archives: Try F#

How to Get Started in F# Without Really Trying

A recent trend in programming is the advent of the “Try X” type of web site, where X is some programming language. These sites offer interactive windows where you can enter in code and then see it run. For example, you’ll find sites for various languages, such as the following:

 

Haskell: http://tryhaskell.org/

Lisp: http://nhiro.org/learn_language/LISP-on-browser.html 

OCaml: http://try.ocamlpro.com/

Python: http://www.trypython.org/#

Ruby: http://tryruby.org/levels/1/challenges/0

 

You can do the same with F# on these sites:

http://www.tryfsharp.org/Create

http://tryfs.net/

 

For example, let’s try the basic “Hello world” type of program, which is about as simple as you can get. Either of these links will work, but we’ll start with the Microsoft site. Here’s a screen shot that should be easy enough to follow:

 

TryFSharp

 

As you can see, you have the option to load and save code from here. TryFS.net is somewhat more limited, but will also allow you to run code.

 

All that is well and good, but the title of this post is about how to try F# without really trying. Well, that brings us to another web site, F# Snippets: http://fssnip.net/.

This site has a growing number of various code snippets in a number of categories. Select a snippet, and you come to a page similar to the following snippet for filtering lists:

 

FSharpFilteringListsSnippet

 

So, that’s it! With just a few mouse clicks, you can play all you want with F#, without having to download and install anything, and without typing any code! Enjoy!