Improved fold example.