Hi, you might be interested by [list-build 5] that will output a list every five items, it's attached
Le mardi 23 septembre 2008 à 02:22 -0700, Luke Iannini a écrit :
Hallo, I continue to collect list-abs (among other things) in SVN under abstractions/senderfruit/, but I thought I'd highlight a few recent ones that I have found particularly handy as of late:
list-slice - the latest addition: works just like Python's slice notation, and thanks to list-splat, even accepts negative indices. [list-slice 2 -2] gives the list minus its first two and last two elements. [list-slice 5 0] gives the 5th element (which is always Lelu) through the end of the list, or [list-slice 0 4] for the first 4 elements (rapping, scratching, graffiti and breakin').
list-value and its brother list-value-extend: [value] for lists. All same-named [list-value] objects always hold the same list, even newly created ones. list-value-extend is a handy shortcut that appends new values rather than replacing. Both accept [clear( to clear their contents.
list-dripx is just like list-drip, except it drips "x" values at a time (e.g. [a b c d e f g h i( becomes [a b c( [d e f( [g h i( )
list-proc-insert does decorating: cross connect it with a process to process incoming lists and then insert the results back into the original list. For example, append the length of a list onto the original list (oh no, now it is creating paradoxes). It has uses, I promise, I just can't remember them right now.
Finally, list-split-at, which simply splits a list every time it encounters a delimiter, so [a b * c d e * f(-[list-split-at *] gives [a b( [c d e( [f(.
This time, these are all thankfully French vanilla bean. (well, except for [import] statements, feel free to strip them if you don't need them or make a dummy [import] object)
Cheers Luke _______________________________________________ Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list