# Blog

## Unifying Structured Recursion Schemes

by Nicolas Wu

Posted on 20 March 2014

Last year at ICFP 2013 I presented Unifying Structured Recursion Schemes, which was joint work with Ralf Hinze and Jeremy Gibbons. A few people asked me if I would be able to make the presentation available online, so here it is on youtube: The talk dances over a lot of the interesting details, so I hope that if you’re interested, you’ll read the paper. You can download a copy here. Here’s the abstract: Folds over inductive datatypes are well understood and widely used. In their plain form, they are quite restricted; but many disparate generalisations have been proposed that enjoy ...

## The Conditional Choice Operator

by Nicolas Wu

Posted on 1 August 2011

A recent reddit post asking for a library of conditional one-liners and combinators reminded me of one of my favourite operators: the conditional choice. Most programmers are used to the so-called McCarthy conditional: if p then x else y An alternative way of viewing this is as a ternary operator: x <| p |> y This operator is known as the conditional choice, but I’m told that it was introduced by Tony Hoare, so maybe naming it the Hoare conditional would make more sense (it makes an appearance in Hoare’s work on Communicating Sequential Processes ...

## Do The Hokey Cokey

by Nicolas Wu

Posted on 18 April 2011

Tags: Category Theory

A recent blog post by Jeremy Gibbons, Morality and Temptation, left the exercise of finding two definitions of the arrow with the signature $$μF → νF$$, and showing that they are equivalent. This post shows my solution to this problem, and while I’m here, I too have a confession to make: when dealing with the ins and outs of initial algebras and final coalgebras I sometimes get the Hokey Cokey playing in my mind. For those of you who don’t know this children’s song, it goes something like this: You put your left foot in,

## Injective Representables

by Nicolas Wu

Posted on 7 April 2011

Tags: Category Theory

In this article I’ll show how the injective and surjective properties of a function have a nice relationship with the injectivity of the corresponding representable functors, and how the right cancellative definition of surjection can be derived from the standard one. This is a fairly trivial discussion about a simple observation, so don’t expect anything spectacular. The definition of injectivity is usually given in the following terms, where a function is injective when it is left cancellative: $$h$$ is injective iff $$\forall f, g \cdot h . f = h . g \Rightarrow f = g$$ ...

## Rho-llercoaster Rides

by Nicolas Wu

Posted on 16 January 2011