Changed lambda syntax to use 'fun'.