This code sample shows how to create a function that raises number to a given power using supercompilation with quotations. For any given power, the function returns quoted expression for calculating the power using explicit multiplications, which is then evaluated.
21 people like thisPosted: 13 years ago by Dmitry Soshnikov
This snippet shows how to plot data on a form using .NET 4.0 Chart control.
37 people like thisPosted: 13 years ago by Dmitry Soshnikov
Compute the factorial of a given number by building the list of permutations of the list of first n numbers [1..n] and taking its length
2 people like thisPosted: 11 years ago by Dmitry Soshnikov
This sample show how to use seq-yield syntax to convert a binary tree to a sequence of elements.
3 people like thisPosted: 6 years ago by Dmitry Soshnikov
This code sample generates Pascal's triangle as jagged 2D list (list of lists).
19 people like thisPosted: 13 years ago by Dmitry Soshnikov
This is to demonstrate that: (1) there are many ways to solve the same problems; (2) operators can be grouped together into data structures and act as data; (3) you can have fun in F# in many ways.
57 people like thisPosted: 13 years ago by Dmitry Soshnikov
This snippet computes the infinite sequence of points that form Sierpinski triangle, and draws this fractal figure using FSharp.Charting
5 people like thisPosted: 8 years ago by Dmitry Soshnikov