This site is supported by donations to The OEIS Foundation.
Template:List/doc
The {{list}} list function template may be used to create a list (with up to 257 items, matching the capabilities of {{vertical bar graph from lists}} or {{bar graph from lists}}) from a b-file segment or a function, otherwise returns an error message.
The {{list}} list function template may also be used to get the number of items in a list. (NOT YET IMPLEMENTED)
The {{list}} list function template may also be used to get the list item at index.
The {{list}} list function template may also be used to put a list item at index. (NOT YET IMPLEMENTED)
Contents
Usage
Usage: do = create
To create a list, enter
- {{list|do = create|from = b-file|input = input|word = word|list_separator = list_separator}}
or
- {{list|create|from = b-file|input = input|word = word|list_separator = list_separator}}
or
- {{list|do = create|from = function|function = function|start = start|step = step|count = count|list_separator = list_separator}}
or
- {{list|create|from = function|function = function|start = start|step = step|count = count|list_separator = list_separator}}
Usage: do = getLength
- {{list|do = getLength|list = list|list_separator = list_separator}}
or
- {{list|getLength|list|list_separator}}
Usage: do = get
- {{list|do = get|list = list|at = index|list_separator = list_separator}}
or
- {{list|get|list|index|list_separator}}
Usage: do = put
- {{list|do = put|list = list|item = item|at = index|list_separator = list_separator}}
or
- {{list|put|list|item|index|list_separator}}
Valid input
- do is create, getLength, get, put, ... (default is create)
- from is b-file, function, ... (default is b-file)
- input is a segment from a b-file (maximum of 257 lines of n a(n) pairs, separated with a single space, each line ending with a new line character)
- word is zero-based index of word or number (default is 1, as a(n) is second number of a b-file line)
- function is the name of a mathematical function template to call on its first argument (all other arguments of the function must have default values) (used in conjunction with from = function)
- start is first value of argument (used in conjunction with from = function)
- step is increment/decrement amount of argument (used in conjunction with from = function)
- count is the number of steps (maximum is 257 steps) (used in conjunction with from = function)
- list is a list (used in conjunction with do = getLength, do = get and do = put)
- item a new list item (used in conjunction with do = put)
- at is list item index (nonnegative from start of list, negative from end of list) (used in conjunction with do = get and do = put)
- list_separator is character to use to separate the list items (default is ,)
Examples
Examples: do = create
Examples: do = create & from = function
Examples with valid input
{{list | do = create | from = function | function = Fibonacci | start = -20 | step = 1 | count = 41 | <!-- list_separator = , --> }}
gives
-6765,4181,-2584,1597,-987,610,-377,233,-144,89,-55,34,-21,13,-8,5,-3,2,-1,1,0,1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765
{{list | do = create | from = function | function = Fibonacci | start = -20 | step = 2 | count = 21 | <!-- list_separator = , --> }}
gives
-6765,-2584,-987,-377,-144,-55,-21,-8,-3,-1,0,1,3,8,21,55,144,377,987,2584,6765
{{list | do = create | from = function | <!-- function = n --> | start = -128 | step = 1 | count = 257 | <!-- list_separator = , --> }}
gives
-128,-127,-126,-125,-124,-123,-122,-121,-120,-119,-118,-117,-116,-115,-114,-113,-112,-111,-110,-109,-108,-107,-106,-105,-104,-103,-102,-101,-100,-99,-98,-97,-96,-95,-94,-93,-92,-91,-90,-89,-88,-87,-86,-85,-84,-83,-82,-81,-80,-79,-78,-77,-76,-75,-74,-73,-72,-71,-70,-69,-68,-67,-66,-65,-64,-63,-62,-61,-60,-59,-58,-57,-56,-55,-54,-53,-52,-51,-50,-49,-48,-47,-46,-45,-44,-43,-42,-41,-40,-39,-38,-37,-36,-35,-34,-33,-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128
{{list | do = create | from = function | <!-- function = n --> | start = -1280 | step = 10 | count = 257 | <!-- list_separator = , --> }}
gives
-1280,-1270,-1260,-1250,-1240,-1230,-1220,-1210,-1200,-1190,-1180,-1170,-1160,-1150,-1140,-1130,-1120,-1110,-1100,-1090,-1080,-1070,-1060,-1050,-1040,-1030,-1020,-1010,-1000,-990,-980,-970,-960,-950,-940,-930,-920,-910,-900,-890,-880,-870,-860,-850,-840,-830,-820,-810,-800,-790,-780,-770,-760,-750,-740,-730,-720,-710,-700,-690,-680,-670,-660,-650,-640,-630,-620,-610,-600,-590,-580,-570,-560,-550,-540,-530,-520,-510,-500,-490,-480,-470,-460,-450,-440,-430,-420,-410,-400,-390,-380,-370,-360,-350,-340,-330,-320,-310,-300,-290,-280,-270,-260,-250,-240,-230,-220,-210,-200,-190,-180,-170,-160,-150,-140,-130,-120,-110,-100,-90,-80,-70,-60,-50,-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,280,290,300,310,320,330,340,350,360,370,380,390,400,410,420,430,440,450,460,470,480,490,500,510,520,530,540,550,560,570,580,590,600,610,620,630,640,650,660,670,680,690,700,710,720,730,740,750,760,770,780,790,800,810,820,830,840,850,860,870,880,890,900,910,920,930,940,950,960,970,980,990,1000,1010,1020,1030,1040,1050,1060,1070,1080,1090,1100,1110,1120,1130,1140,1150,1160,1170,1180,1190,1200,1210,1220,1230,1240,1250,1260,1270,1280
Examples: do = create & from = b-file
Examples with valid input
{{list | do = create | from = b-file | <!-- word = 1 --> | <!-- list_separator = , --> | input = 0 0 1 1 2 -1 3 2 4 -2 5 3 6 -3 7 4 8 -4 9 5 10 -5 11 6 12 -6 13 7 14 -7 15 8 }}
gives
0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7,8
{{list | do = create | from = b-file | <!-- word = 1 --> | <!-- list_separator = , --> | input = 0 0 1 1 2 -1 3 2 4 -2 5 3 6 -3 7 4 8 -4 9 5 10 -5 11 6 12 -6 13 7 14 -7 15 8 16 -8 17 9 18 -9 19 10 20 -10 21 11 22 -11 23 12 24 -12 25 13 26 -13 27 14 28 -14 29 15 30 -15 31 16 32 -16 33 17 34 -17 35 18 36 -18 37 19 38 -19 39 20 40 -20 41 21 42 -21 43 22 44 -22 45 23 46 -23 47 24 48 -24 49 25 50 -25 51 26 52 -26 53 27 54 -27 55 28 56 -28 57 29 58 -29 59 30 60 -30 61 31 62 -31 63 32 64 -32 65 33 66 -33 67 34 68 -34 69 35 70 -35 71 36 72 -36 73 37 74 -37 75 38 76 -38 77 39 78 -39 79 40 80 -40 81 41 82 -41 83 42 84 -42 85 43 86 -43 87 44 88 -44 89 45 90 -45 91 46 92 -46 93 47 94 -47 95 48 96 -48 97 49 98 -49 99 50 100 -50 101 51 102 -51 103 52 104 -52 105 53 106 -53 107 54 108 -54 109 55 110 -55 111 56 112 -56 113 57 114 -57 115 58 116 -58 117 59 118 -59 119 60 120 -60 121 61 122 -61 123 62 124 -62 125 63 126 -63 127 64 128 -64 129 65 130 -65 131 66 132 -66 133 67 134 -67 135 68 136 -68 137 69 138 -69 139 70 140 -70 141 71 142 -71 143 72 144 -72 145 73 146 -73 147 74 148 -74 149 75 150 -75 151 76 152 -76 153 77 154 -77 155 78 156 -78 157 79 158 -79 159 80 160 -80 161 81 162 -81 163 82 164 -82 165 83 166 -83 167 84 168 -84 169 85 170 -85 171 86 172 -86 173 87 174 -87 175 88 176 -88 177 89 178 -89 179 90 180 -90 181 91 182 -91 183 92 184 -92 185 93 186 -93 187 94 188 -94 189 95 190 -95 191 96 192 -96 193 97 194 -97 195 98 196 -98 197 99 198 -99 199 100 200 -100 201 101 202 -101 203 102 204 -102 205 103 206 -103 207 104 208 -104 209 105 210 -105 211 106 212 -106 213 107 214 -107 215 108 216 -108 217 109 218 -109 219 110 220 -110 221 111 222 -111 223 112 224 -112 225 113 226 -113 227 114 228 -114 229 115 230 -115 231 116 232 -116 233 117 234 -117 235 118 236 -118 237 119 238 -119 239 120 240 -120 241 121 242 -121 243 122 244 -122 245 123 246 -123 247 124 248 -124 249 125 250 -125 251 126 252 -126 253 127 254 -127 255 128 256 -128 }}
gives
0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7,8,-8,9,-9,10,-10,11,-11,12,-12,13,-13,14,-14,15,-15,16,-16,17,-17,18,-18,19,-19,20,-20,21,-21,22,-22,23,-23,24,-24,25,-25,26,-26,27,-27,28,-28,29,-29,30,-30,31,-31,32,-32,33,-33,34,-34,35,-35,36,-36,37,-37,38,-38,39,-39,40,-40,41,-41,42,-42,43,-43,44,-44,45,-45,46,-46,47,-47,48,-48,49,-49,50,-50,51,-51,52,-52,53,-53,54,-54,55,-55,56,-56,57,-57,58,-58,59,-59,60,-60,61,-61,62,-62,63,-63,64,-64,65,-65,66,-66,67,-67,68,-68,69,-69,70,-70,71,-71,72,-72,73,-73,74,-74,75,-75,76,-76,77,-77,78,-78,79,-79,80,-80,81,-81,82,-82,83,-83,84,-84,85,-85,86,-86,87,-87,88,-88,89,-89,90,-90,91,-91,92,-92,93,-93,94,-94,95,-95,96,-96,97,-97,98,-98,99,-99,100,-100,101,-101,102,-102,103,-103,104,-104,105,-105,106,-106,107,-107,108,-108,109,-109,110,-110,111,-111,112,-112,113,-113,114,-114,115,-115,116,-116,117,-117,118,-118,119,-119,120,-120,121,-121,122,-122,123,-123,124,-124,125,-125,126,-126,127,-127,128,-128
Code Result Comment {{list|do = create|from = b-file|input =}} (empty list)
Examples: do = getLength
Not yet implemented (currently returns the list.)
Code Result {{list|getLength|2; 3; 5; 7; 11; 13; 17; 19; 23; 29|;}} Not yet implemented! List: 2; 3; 5; 7; 11; 13; 17; 19; 23; 29 {{list|getLenght|2, 3, 5, 7, 11, 13, 17, 19, 23, 29}} Not yet implemented! List: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29
Examples: do = get
Code Result {{list|get|2; 3; 5; 7; 11; 13; 17; 19; 23; 29|5|;}} 13 {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29}} 2 {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|0}} 2 {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|5}} 13 {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|-11}} {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|-10}} 2 {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|10}} {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|9}} 29 {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|-1}} 29 {{list|get|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|-3}} 19
Examples: do = put
Not yet implemented (currently returns the list.)
Code Result {{list|put|list = 2; 3; 5; 7; 11; 13; 17; 19; 23; 29|item = 31|at = -1|list_separator = ;}} Not yet implemented! List: 2; 3; 5; 7; 11; 13; 17; 19; 23; 29 {{list|put|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|item = 31|at = -1}} Not yet implemented! List: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 {{list|put|2, 3, 5, 7, 11, 13, 17, 19, 23, 29|31|at = -1}} Not yet implemented! List: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29
Examples with invalid input (returns error message)
Code Result {{list|getLenght|2, 3, 5, 7, 11, 13}} List error: Invalid argument, do, must be among create, getLength, get, put {{list|sort|5, 7, 2, 3, 11, 13, 19, 17}} List error: Invalid argument, do, must be among create, getLength, get, put {{list|do = create|from = list|input = 2, 3, 5, 7, 11, 13}} List error: Second argument, from, must be among b-file, function, ...
Code
{{List}} template
<noinclude>{{documentation}}</noinclude><includeonly>{{#switch: {{{do|{{{1|create}}}}}} | create = {{#switch: {{{from|{{{2|b-file}}}}}} | b-file = {{trim | {{~List | do = {{{do|create}}} | from = {{{from|b-file}}} | word = {{{word|1}}} <!-- second word (index 1) as default, since it is where a(n) appears in a b-file line --> | list_separator = {{{list_separator|,}}} | input = {{{input|}}} }}<!-- No space or new line in here -->| substring={{{list_separator|,}}} }} | function = {{trim| <!-- -->{{#ifexpr: ({{{count|257}}}) > 0 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 0 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 1 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 1 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 2 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 2 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 3 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 3 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 4 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 4 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 5 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 5 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 6 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 6 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 7 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 7 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 8 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 8 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 9 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 9 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 10 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 10 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 11 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 11 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 12 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 12 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 13 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 13 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 14 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 14 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 15 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 15 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 16 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 16 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 17 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 17 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 18 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 18 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 19 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 19 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- --> <!-- (...) --> <!-- -->{{#ifexpr: ({{{count|257}}}) > 240 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 240 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 241 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 241 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 242 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 242 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 243 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 243 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 244 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 244 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 245 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 245 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 246 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 246 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 247 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 247 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 248 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 248 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 249 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 249 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 250 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 250 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 251 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 251 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 252 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 252 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 253 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 253 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 254 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 254 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 255 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 255 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- -->{{#ifexpr: ({{{count|257}}}) > 256 | {{ {{{function|n}}} | {{#expr: ({{{start|0}}}) + 256 * ({{{step|1}}}) }} }}{{{list_separator|, }}} |}}<!-- --><!-- No space or new line in here -->| substring={{{list_separator|,}}} }} | {{error|List error: Second argument, <tt>from</tt>, must be among <tt>b-file</tt> or <tt>function</tt> }} }} | getLength = <!-- get number of list items -->Not yet implemented! List: {{{list|{{{2|}}}}}} | get = <!-- returns list item at index (nonnegative from start of list, negative from end of list) -->{{#explode: {{{list|{{{2|}}}}}} | {{{list_separator|{{{4|, }}}}}} | {{{at|{{{3|0}}}}}} <!-- index 0 by default --> }} | put = <!-- returns new list with new item at index (nonnegative from start of list, negative from end of list) -->Not yet implemented! List: {{{list|{{{2|}}}}}} | {{error|List error: First argument, <tt>do</tt>, must be among <tt>create</tt>, <tt>getLength</tt>, <tt>get</tt> or <tt>put</tt> }} }}</includeonly>
{{~List}} core template
<noinclude>Core function for the {{tlxb|list}} template. Extracts the second word (or number,) e.g. <tt>a(n)</tt> from a [[b-file]] line, from each of up to 257 lines, then creates a list from those items, separated with <tt>list_separator</tt> (default ,). Trailing <tt>list_separator</tt> (default ,) need to be removed by the {{tlxb|list}} wrapper template. [[Category:Core function templates|{{PAGENAME}}]]<!--{{documentation}}--></noinclude><includeonly>{{#switch: {{{do|{{{1|create}}}}}} | create={{#switch: {{{from|{{{2|b-file}}}}}} <!-- n a(n) pairs separated with single space, lines ending with new line character --> | b-file={{#if: {{{input|}}} | <!-- urlencoded: new line as %0A, space as + --><!-- -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A| 0}}|+|{{{word|1}}}}}{{{list_separator|, }}}<!-- -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A| 1}}|+|{{{word|1}}}}}{{{list_separator|, }}}<!-- -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A| 2}}|+|{{{word|1}}}}}{{{list_separator|, }}}<!-- -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A| 3}}|+|{{{word|1}}}}}{{{list_separator|, }}}<!-- (...) -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A|253}}|+|{{{word|1}}}}}{{{list_separator|, }}}<!-- -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A|254}}|+|{{{word|1}}}}}{{{list_separator|, }}}<!-- -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A|255}}|+|{{{word|1}}}}}{{{list_separator|, }}}<!-- -->{{#explode:{{#explode:{{urlencode:{{{input}}}}}|%0A|256}}|+|{{{word|1}}}}}{{{list_separator|, }}} | <!-- returns empty list --> }} | {{error|List error: Second argument is not valid }} }} | {{error|List error: First argument is not valid }} }}</includeonly>