RosettaCodeData/Task/Reverse-a-string/PARI-GP/reverse-a-string-3.parigp
2023-07-01 13:44:08 -04:00

11 lines
264 B
Text

\\ Version #1 upgraded to complete function. Practically the same.
reverse(str)={return(concat(Vecrev(str)))}
{
\\ TEST2
print(" *** Testing reverse from Version #1:");
print(reverse("ABCDEF"));
my(s,sr,n=10000000);
s="ABCDEFGHIJKL";
for(i=1,n, sr=reverse(s));
}