I'm busy going through the very anaemic walk-through F# project provided by MS in VS 2010 Beta 2, and came across something that needs some explanation:
let rec SumList xs =
match xs with
| [] -> 0
| y::ys -> y + SumList ys
I assume match is something like a switch in other languages, where an empty list results in a 0 return value, but the second case fascinates me. Does this tell the 'runtime|interpretor' to evaluate the match argument as y cons ys, or rather as 'if the argument is of the form y cons ys', recurs with y and ys?