(*stringcopy*) local fun stringcopy0 (n,s) = if n=0 then "" else stringcopy0(n-1,s)^s in fun stringcopy1 (n,s) = if n<0 then "error" else stringcopy0(n,s) end; (********************************************************************) fun stringcopy2 (n,s) = let fun stringcopy0 (n,s) = if n=0 then "" else stringcopy0 (n-1,s) ^ s in if n<0 then "error" else stringcopy0(n,s) end;