Patterns and Match Expressions in F#

Sign in to queue


In this video, programming writer, Gordon Hogenson explains and gives examples of patterns in F# and explains the use of the match expression to control branching based on patterns in data. But first, a disclaimer Gordon wanted to make: “Regrettably, I have not been able to retrain myself yet to use the word value instead of variable. In F#, all values are immutable by default, so it’s not really correct to use the term variable, as I do in the video.”   See Part 2 of this video:


You can also learn more in the topics Patterns and Match Expressions.


Kathleen McGrath
Visual Studio User Education



Download this episode

The Discussion

  • User profile image

    Ok, I'm a great fun of F# as well as IronPython. Besides what he is talking about, i feel his coolness and geeky just because he speaks about F#! Great topic! So cool that he uses glasses!

  • User profile image

    It is great to have some F# videos that are encoded at the higher resolution, so that one can actually see the syntax.  

    Having a language that can be run interactivly really helps with trying to demonstrate basic constructs, when you are trying to teach people how to use it.  

    I thought that this video / interview was well done.

  • User profile image

    Kathleen has produced several high quality pieces for C9. Check it out:

    Thank you Kathleen!!!

  • User profile image

    Thats just the new WPF editor with a Vector based text editor

  • User profile image

    Speaking of patterns and matching, how do you search for "F#" on Channel9?  I get "Search term too small"...


  • User profile image

    Yes I don't like Microsoft naming; it can be hard to search for F#, C#, .NET

  • User profile image

    You can search for "FSharp" and "CSharp".  Videos are also tagged, so that you can easily find all videos created for a certain technology. For example, you can click on the FSharp tag in this post ( for F# videos.

  • User profile image

    Agree. I did never ever see the teacher explaining few lines of code during 20 minutes without saying anything else, than is displayed on the screen.


    During this 20 minutes I learn from the teacher, that _ means "wildcard". Everything else is on the VS screen



    With my regards, Kathy: much appreciate your videos, but in this case one JPG wilth codeshot will say exactly the same, what this 20 minutes movie.


  • User profile image
    david white

    Helpful, but a bit rambling and lacked usage examples (eg for the constructQuery, it would be more instructive to see it used with different input data).

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.