Inner generic functions are not permitted in quoted expressions. Consider adding some type constraints until this function ...