avoid double-wrapping s-fun in typecheck, and avoid extra appliations to wrap functions