Lazy Lists in C#

Uncategorized 28 September 2007 | 0 Comments

I had the thought—while browsing through some old code—that the code I used to implement futures in C# would be useful for doing things lazily, if you just moved the evaluation phase to when the value was actually demanded… this started me off thinking about how to implement a proper lazily-evaluated list in C#. A [...]

Tagged in , , , ,

Computing with XSLT

Uncategorized 19 July 2007 | 2 Comments

Since XSLT is basically a pattern-matching functional programming language, we should be able to use it to compute. I’m going to use it to implement one of the most basic functions: Peano-style addition. First of all we have to have an idea of what the numbers look like. We want to simulate this in XSL: [...]

Tagged in , , , , ,

Functors aren’t as hard as they sound

Uncategorized 17 July 2007 | 0 Comments

Suppose we have a functor. Let’s call it “My Functor”, because that’s a nice friendly name. I’ll call it for short. Now, a functor is—according to higher sources—something which takes any type to a type . Let’s see how we can accomplish that with our functor, using Haskell code: data MyFunctor a = Construct a [...]

Tagged in , , ,

Exponential Bags: Integration of Types, continued

Uncategorized 11 April 2007 | 0 Comments

Derivatives of Containers claims to look for the ‘container which is its own derivative’; in other words, a type analogue of ex. They arrive at (approximated in ASCII and the notation used in my previous post): T[X] = Forall(n : N) Xn / Autn This is a little much for me, since I don’t understand [...]

Tagged in , , ,