Tuesday, 24 June 2008

Tricks with recursion: knots, modules and polymorphism

The OCaml Journal just published an article about recursive type and function definitions:

"This article introduces some of the design patterns found in functional programming. The phrase "untying the recursive knot" refers to the ability to remove direct recursion from value and type definitions through the use of parameterization. OCaml's recursive modules allow recursion to cross module boundaries. Polymorphic recursion allows functions to call themselves with different type parameters. This article introduces all of these functional design patterns with illustrations and worked examples..."

To read this article and more, subscribe to The OCaml Journal today!


Friday, 13 June 2008

Real-time Finite Element Materials simulation

The OCaml Journal just published an article about real-time simulation:

"Finite Element Materials simulations (FEMs) model a continuous volume of material by breaking it down into a discrete representation with many finite parts. This article describes a simple but fun program that simulates the dynamics of a 2D system of particles and springs in real-time. The program visualizes the results using OpenGL..."

To read this article and more, subscribe to The OCaml Journal today!