# Check your F# skills

While working on Project Euler Problem 54 and considering data presentation I came up with the following snippet:

type IntPair = | Foo of int*int | Bar of int*int member __.LValue = match __ with | Bar(x,y) | Foo(x,y) -> x member __.RValue = function | Bar(x,y) | Foo(x,y) -> y let a = Bar(10,5).LValue let b = Foo(10,5).RValue

Try finding what would be the values of **a** and **b** without help from FSI or VS.

Advertisements

Leave a Comment