0
comment
on 9/17/2013 6:11 AM
In a recent StackOverflow question the poster asked about the difference between tupled and curried form of a function in F#. In F#, you can use pattern matching to easily define a function that takes a tuple as an argument. For example, the poster's function was a simple calculation that multiplies the number of units sold n by the price p: 1: let salesTuple (price, count) = price * (float count) The function takes a single argument of type Tuple<float, int> (or, using the nicer F# notation float * int[...]
>> Read the full article on tomasp.net
.
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper