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 > _______________________________________________ > [email protected] mailing list > UNSUBSCRIBE and account-management -> > http://lists.puredata.info/listinfo/pd-list
#N canvas 30 211 450 300 12; #X obj 154 62 inlet; #X obj 201 307 outlet; #X obj 222 244 list prepend; #X obj 330 245 t l; #X obj 154 127 i; #X obj 185 127 + 1; #X obj 151 159 sel 0; #X obj 151 95 t b a; #X obj 201 272 list; #X obj 217 128 mod 1; #X obj 233 27 loadbang; #X obj 245 54 \$1; #X obj 242 82 max 1; #X obj 321 74 inlet; #X obj 153 195 t b b; #X connect 0 0 7 0; #X connect 2 0 3 0; #X connect 2 0 8 1; #X connect 3 0 2 1; #X connect 4 0 5 0; #X connect 4 0 6 0; #X connect 5 0 9 0; #X connect 6 0 14 0; #X connect 7 0 4 0; #X connect 7 1 2 0; #X connect 8 0 1 0; #X connect 9 0 4 1; #X connect 10 0 11 0; #X connect 11 0 12 0; #X connect 12 0 9 1; #X connect 13 0 2 1; #X connect 14 0 8 0; #X connect 14 1 2 1;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
