Showing posts with label F# Code to Structure and Interpretation of Computer programs. Show all posts
Showing posts with label F# Code to Structure and Interpretation of Computer programs. Show all posts

Sunday, February 22, 2009

Data Abstraction in F#

Data abstraction deals with the question, how to compose compound data from primitive types. SICP states : Data abstraction is a methodology that enables us to isolate how a compound data object is used from the details of how it is constructed from primitive data object. We will firstly implement a solution which is similar to the SICP text book (http://mitpress.mit.edu/sicp/). It uses tuples as primitive data structure. Indeed, tuples are very straightforward and powerful primitive data structure in functional programming ,but on the other hand, we have to consider, whether these primitives are suitable for .Net platform in the era of SOA or cloud computing.
Please check http://www.paul-abraham.com/FSharpCode2SICP.doc to get the whole series .

Thursday, October 30, 2008

Formulation Abstractions with Higher Order Functions

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

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