aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Iannini <lukeiannini@users.sourceforge.net>2008-09-26 07:32:06 +0000
committerLuke Iannini <lukeiannini@users.sourceforge.net>2008-09-26 07:32:06 +0000
commite28fb440a363a94180c4cb57fbaf1b00065a2810 (patch)
tree5737bc927bb715ac1540af22c46b3d66a38bed01
parent89f0eec121e7ed1a5367889a7036bac40c99b135 (diff)
list-idx-many, for building a sublist from specific elements of a longer list
svn path=/trunk/abstractions/senderfruit/; revision=10310
-rw-r--r--core/list-idx-many-help.pd14
-rw-r--r--core/list-idx-many.pd37
2 files changed, 51 insertions, 0 deletions
diff --git a/core/list-idx-many-help.pd b/core/list-idx-many-help.pd
new file mode 100644
index 0000000..780a160
--- /dev/null
+++ b/core/list-idx-many-help.pd
@@ -0,0 +1,14 @@
+#N canvas 301 700 450 300 10;
+#X declare -lib iemlib -lib list-abs;
+#X obj 79 160 list-idx-many 2 4 6;
+#X obj 79 190 print;
+#X msg 79 114 a b c d e f g;
+#X text 19 12 [list-idx-many] - just like [list-idx] except you can
+specify multiple indexes to grab (outputting a new list instead of
+a single element);
+#X msg 190 115 1 2 4 5 6;
+#X text 276 230 2008 Luke Iannini;
+#X text 276 246 proyekto.net;
+#X connect 0 0 1 0;
+#X connect 2 0 0 0;
+#X connect 4 0 0 1;
diff --git a/core/list-idx-many.pd b/core/list-idx-many.pd
new file mode 100644
index 0000000..36af58e
--- /dev/null
+++ b/core/list-idx-many.pd
@@ -0,0 +1,37 @@
+#N canvas 1079 646 553 411 10;
+#X declare -lib iemlib -lib list-abs;
+#X obj 285 34 import iemlib list-abs;
+#X obj 133 61 dollarg;
+#X obj 112 153 list;
+#X obj 133 40 loadbang;
+#X obj 203 40 inlet;
+#X obj 64 154 list;
+#X obj 64 252 list-idx;
+#X obj 112 183 list-drip;
+#X obj 112 211 t b a;
+#X obj 85 40 inlet;
+#X obj 64 287 list-extend;
+#X obj 85 79 t b a b;
+#X obj 203 183 t b;
+#X obj 163 349 list;
+#X obj 163 374 outlet;
+#X text 182 60 can remove the dollarg with no harm except that the
+index-list must be put in the right inlet rather than as arguments
+;
+#X connect 1 0 2 1;
+#X connect 2 0 7 0;
+#X connect 3 0 1 0;
+#X connect 4 0 2 1;
+#X connect 5 0 6 0;
+#X connect 6 0 10 0;
+#X connect 7 0 8 0;
+#X connect 7 1 13 0;
+#X connect 8 0 5 0;
+#X connect 8 1 6 1;
+#X connect 9 0 11 0;
+#X connect 10 0 13 1;
+#X connect 11 0 2 0;
+#X connect 11 1 5 1;
+#X connect 11 2 12 0;
+#X connect 12 0 10 1;
+#X connect 13 0 14 0;