December 2010 - Posts

0
Comments

F# Symbolic Operators by Adil Akhter

This post is about how we can define a custom operator using F#. Defining a new operator in F# is very straightforward. For example, if one wants to define "!" as an operator to compute factorial of an integer, following is the way to do it...
Filed under: ,
0
Comments

F# Recipe : Computing Length of a List by Adil Akhter

Code: let rec computeLength list = match list with | [] -> 0 | head::tail -> 1 + computeLength tail Result: > computeLength [1..10];; val it : int = 10 >
Filed under: ,
More Posts