added 'reduce' to tiny lib