Philippe de Rochambeau on Mon, 15 Nov 2021 14:08:04 +0100 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Cycle structure |
For those of you that might be interested, here’s my implementation of the Caesar Cypher in PariGP: alphabet = Vecsmall("ABCDEFGHIJKLMNOPQRSTUVWXYZ"); get(v,i) = v[((i)%#v)+1]; caesar(s,n) = { n1 = [ get(n, i + s) | i <- [0 .. #n - 1] ]; strchr(n1) } c = caesar(3, alphabet) print(c)
|