Fun with anonymous methods – using higher-order functions