RosettaCodeData/Task/Reverse-a-string/PARI-GP/reverse-a-string-3.pari

12 lines
264 B
Text
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
\\ 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));
}