kmcgrath

Patterns and Match Expressions in F#

Download this episode

Download Video

Description

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: https://channel9.msdn.com/posts/kmcgrath/Active-Patterns-F/

 

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

 

Kathleen McGrath
Visual Studio User Education
http://blogs.msdn.com/kathleen/

Embed

Format

Available formats for this video:

Actual format may change based on video formats available and browser capability.

    The Discussion

    • hack2rootho​tmai

      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!

    • JoshRoss

      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.

    • Charles

      Kathleen has produced several high quality pieces for C9. Check it out: http://channel9.msdn.com/Niners/kmcgrath/

      Thank you Kathleen!!!
      C

    • vesuvius

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

    • sinclas

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

       

    • CSMR

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

    • kmcgrath

      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 (http://channel9.msdn.com/tags/FSharp/) for F# videos.

    • osiaq

      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.

      [SPOILER ALERT]

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

      [/SPOILER ALERT]

       

      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.

       

    • 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 continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.