July 2007

A lazy example

On a french forum, someone wrote an little exercise: how to get all sets of numbers (> 0) whose sum is exactly n? Here is my solution, using lazy evaluation.

Tuesday 17 July 2007 - No comments

Active patterns

Ce billet est basé en grande partie sur le papier Extensible Pattern Matching via a Lightweight Language Extension. Il présente le concept d'active patterns, une généralisation du pattern matching.

Sunday 15 July 2007 - No comments