list-swap-help.pd 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. #N canvas 0 31 574 354 10;
  2. #X msg 57 84 0 1 2 3 4 5 6 7 8 9 10 11;
  3. #X floatatom 145 148 5 0 0 0 - - -;
  4. #X floatatom 101 146 5 0 0 0 - - -;
  5. #X obj 57 190 list-swap 2 5;
  6. #X text 49 19 [list-swap] - swap two elements of a list at given indices.
  7. Index values can be negative. If an index value is out of range \,
  8. the list is passed with no change.;
  9. #X msg 75 114 list a b c d e f g h i j k;
  10. #X obj 57 216 prepent set;
  11. #X msg 57 241 a c b;
  12. #N canvas 506 181 494 396 META 0;
  13. #X text 12 25 LICENSE SIBSD;
  14. #X text 12 165 HELP_PATCH_AUTHORS Frank Barknecht. "pd meta" information
  15. added by Jonathan Wilkes for Pd version 0.42.;
  16. #X text 12 5 KEYWORDS control list_op;
  17. #X text 12 65 INLET_0 anything;
  18. #X text 12 145 AUTHOR Frank Barknecht;
  19. #X text 12 45 DESCRIPTION swap two elements of a list at given indices
  20. ;
  21. #X text 12 85 INLET_1 float;
  22. #X text 12 105 INLET_2 flaot;
  23. #X text 12 125 OUTLET_0 list;
  24. #X restore 512 322 pd META;
  25. #X connect 0 0 3 0;
  26. #X connect 1 0 3 2;
  27. #X connect 2 0 3 1;
  28. #X connect 3 0 6 0;
  29. #X connect 5 0 3 0;
  30. #X connect 6 0 7 0;