Similar to a procedure, but it returns a single value.