A function is called higher order function if it takes functions as arguments and return a function. Say, you have a family of algorithm and each of them differs from one another in some steps, but there is common basic patter. In object oriented world, you will use typically the Strategy–Pattern to tackle this kind of problem.
Please check
http://www.paul-abraham.com/FSharpCode2SICP.doc
Thursday, October 30, 2008
Sunday, October 19, 2008
Continuation Monad
Continuation Monad plays an import role in F# . It powers Workflows. I wrote a sample code in F# and checked monadic Axioms. Please check to get entire series
( http://www.paul-abraham.com/MonadsInFSharp.doc)
( http://www.paul-abraham.com/MonadsInFSharp.doc)
Wednesday, October 8, 2008
Linear Recursion and Linear Iteration (Tail Recursion).
Friends, I am back from Israel and I have attended there a mathematical conference. Now ,I am enjoying reading the wonderful book “Structure and Interpretation of computer Programs”. I have written F# code for Linear Recursion and Linear Iteration (Tail Recursion). Please check http://www.paul-abraham.com/FSharpCode2SICP.doc to get the whole series
Saturday, September 13, 2008
List Monad in F#
Now, it is time look some useful monads than Identity Monad. If you look LINQ query , you can’t miss it recognize the Bind operator(>>=) of a Monad:
public static IEnumerable SelectMany
I am using ResizeArray<_> as List, which is synonym for .Net generic list List<>. I have implemented standard Customer Order scenario to check monads Axioms:
( http://www.paul-abraham.com/MonadsInFSharp.doc)
public static IEnumerable
I am using ResizeArray<_> as List, which is synonym for .Net generic list List<>. I have implemented standard Customer Order scenario to check monads Axioms:
( http://www.paul-abraham.com/MonadsInFSharp.doc)
Wednesday, September 10, 2008
Identity Monad in F#
When I have studied Category Theory at the university , I didn’t know where to use Monads and Kleisli triple.The Whole Gadget was very abstract to me. Since I have encountered with F# Workflows and LINQ , I understand the power and elegance of Monads. In order to learn F#,I have implemented the Identity Monad.
( http://www.paul-abraham.com/MonadsInFSharp.doc)
( http://www.paul-abraham.com/MonadsInFSharp.doc)
Wednesday, September 3, 2008
F# Code to Structure and Interpretation of Computer programs
F# Code to Structure and Interpretation of Computer programs.I love and enjoy reading the book “Structure and Interpretation of computer Programs” (http://mitpress.mit.edu/sicp/) but examples of this book are written in Lisp. Right now ,I am learning F# and I think that it is a great opportunity to acquire practice with this great language. Please check http://www.paul-abraham.com/FSharpCode2SICP.doc to get the whole series . I will add F# implementaions day by day.
Subscribe to:
Posts (Atom)