A protocol based implementation of arrows