function — Legal Definition, Examples & Cases