Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

gLAMOROUS! eXTRAORDINAIRE!

Name: TRUE TRUTH EXPERT !!TthtFzrtPXElUy7 2009-11-19 15:38

hELLO AND WELCOME TO TRUE TRUTH EXPERT INTERNET PERSONA AND EXTRAVAGANJA EXTRAORDINOIR POST OF TODAY.


(map 'string #'(lambda (x) (if (eq x (char-upcase x)) (char-downcase x) (char-upcase x))) (format nil "~@(~A~)" "gLAMOROUS! eXTRAORDINAIRE!"))

Name: Anonymous 2009-11-20 9:51

I am not going to provide source code because I don't feel like typing over and over again the same shit I learned years ago about data structures. Here's just the essential:


list *flatten(tree *t) {
    size_t atomnodes = t->atoms;
    list *r = alloc_list(atomnodes);
    assert(r);
    /* in order macro */
    iter_IO(t, atomnodes, {list_iset(r, iter_it, iter_obj);});
    return r;
}

iter_IO introduces two variables, iter_it which refers to the number of atoms encountered thusfar and iter_obj which refers to the atom itself. list_iset implements O(logn) write access for any listnode by saving each reference and subscript as value-key pairs respectively, in a hashtable.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List