Implement consume-function(50%)