Blog post on my new site.
#category theory
7 posts
18 Apr 2019
24 May 2014
I have never felt entirely comfortable with Haskell’s arrows and skimming the literature for their categorical basis didn’t reveal anything as straightforward as monads or applicatives. It did however lead me to start thinking about monoidal categories and since I always want an example, I thought I would write up Hilbert spaces. Let and be … Continue reading A Monoidal…
22 Apr 2012
We can solve our differential equation using the Implicit Euler method which is unconditionally stable. We can also take this opportunity to use the Vector Package rather than Arrays as it has a richer set of combinators and to tidy up the code to make the payoff explicit (thanks to suggestions by Ben Moseley). First … Continue reading The Implicit…
1 Apr 2012
Suppose we want to find the price of a European call option. Then we need to solve the Black-Scholes equation: Although this particular equation can be solved explicitly, under more realistic assumptions we have to rely on numerical methods. We can approximate the partial differential equation by a difference equation (the minus sign on the … Continue reading Solving a…
12 Nov 2011
There don’t seem to be many examples of anamorphisms around. Here’s one to make up the lack. Let’s start off with our target language. > {-# LANGUAGE > DeriveFunctor, > DeriveFoldable, > DeriveTraversable #-} > > import Data.Foldable > import Data.Traversable > > data TermF a = PlusF a a > | MultF a a … Continue reading Anamorphism Example
15 May 2011
One of my colleagues (Roland Zumkeller) posted some nifty functions to count the number of expressions in an AST for the DSL we work on. This led to an email and chat discussion that I have summarised in this post. Any errors are entirely mine. Let’s start off with our target language. It’s easy to … Continue reading Monadic Caching…
12 May 2008
Nothing to do with differential geometry but there was a question on the haskell-cafe mailing list asking for “a proof that initial algebras & final coalgebras of a CPO coincide”. I presume that means a CPO-category. A category is a CPO-category iff There is a terminator, 1. Each hom-set, , is a CPO with a … Continue reading Isomorphic Types