Function vectorify