September Morn Update
This commit is contained in:
parent
4e2d22a71d
commit
aac6731f2c
6856 changed files with 141342 additions and 21127 deletions
|
|
@ -1,13 +1,13 @@
|
|||
text
|
||||
decode(list l)
|
||||
{
|
||||
integer c, e, i;
|
||||
text al, s;
|
||||
integer c, e;
|
||||
data al, s;
|
||||
|
||||
al = "abcdefghijklmnopqrstuvwxyz";
|
||||
for (i, e in l) {
|
||||
s = insert(s, -1, c = al[e]);
|
||||
al = insert(delete(al, e), 0, c);
|
||||
for (, e in l) {
|
||||
s.append(c = al[e]);
|
||||
al.delete(e).insert(0, c);
|
||||
}
|
||||
|
||||
s;
|
||||
|
|
@ -17,14 +17,13 @@ list
|
|||
encode(text s)
|
||||
{
|
||||
integer c, e;
|
||||
text al;
|
||||
data al;
|
||||
list l;
|
||||
|
||||
al = "abcdefghijklmnopqrstuvwxyz";
|
||||
while (c = initial(s)) {
|
||||
s = delete(s, 0);
|
||||
l.append(e = place(al, c));
|
||||
al = insert(delete(al, e), 0, c);
|
||||
for (, c in b_draft(s)) {
|
||||
l.append(e = al.place(c));
|
||||
al.delete(e).insert(0, c);
|
||||
}
|
||||
|
||||
l;
|
||||
|
|
@ -33,10 +32,7 @@ encode(text s)
|
|||
integer
|
||||
main(void)
|
||||
{
|
||||
integer i;
|
||||
text s;
|
||||
|
||||
for (i, s in list("broood", "bananaaa", "hiphophiphop")) {
|
||||
for (, text s in list("broood", "bananaaa", "hiphophiphop")) {
|
||||
list l;
|
||||
|
||||
l = encode(s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue