You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Returns the item at the given index, or <code><spanclass="keyword">none</span></code> if the index is out of range. Negative indexes start counting from the end of the array. For example, <code>-1</code> will return the last item in the array.</p>
375
375
<p>
376
-
For example, <code>['A, 'B', 'C'][1]</code> returns <code>'B'</code>.</p>
376
+
For example, <code>['A', 'B', 'C'][1]</code> returns <code>'B'</code>.</p>
377
377
<h3id="array-member-functions"> Member functions</h3>
<code>zipper</code> must be a function that takes two arguments: <code>(<spanclass="keyword">any</span> value, <spanclass="keyword">any</span> otherValue) =><spanclass="keyword">any</span></code>.</p>
558
558
<p>
559
-
For example, <code>[1, 2, 3, 4].zip(['A', 'B', 'C'].zip((n, s) => n + s)</code> returns <code>['1A', '2B', '3C']</code>.</p>
559
+
For example, <code>[1, 2, 3, 4].zip(['A', 'B', 'C'], (n, s) => n + s)</code> returns <code>['1A', '2B', '3C']</code>.</p>
<code>predicate</code> can either be <code><spanclass="keyword">none</span></code>, or a function that takes one argument: <code>(<spanclass="keyword">any</span> value) =><spanclass="keyword">bool</span></code>.</p>
588
588
<p>
589
-
For example, <code>[4, 5, 6].<spanclass="keyword">any</span>(n => n > 5)</code> returns <code><spanclass="keyword">none</span></code> (false).</p>
589
+
For example, <code>[4, 5, 6].all(n => n > 5)</code> returns <code><spanclass="keyword">none</span></code> (false).</p>
Returns the numeric Unicode value of a specific character in the given string. The first character is chosen if no index is provided. Returns <code><spanclass="keyword">none</span></code> if the index is out of range or if the given string is <code><spanclass="keyword">none</span></code>.</p>
379
379
<p>
380
-
For example, <code>ord('a')</code> returns <code>97</code>, and <code>ord(4)</code> returns <code>52</code>.</p>
380
+
For example, <code>ord('a')</code> returns <code>97</code>, and <code>ord('4')</code> returns <code>52</code>.</p>
@@ -485,7 +485,7 @@ <h4 id="func_arg"><code><span class="keyword">object</span> func_arg(<span class
485
485
<p>
486
486
Returns an object with information about the specified function parameter, or <code><spanclass="keyword">none</span></code> if the given function is <code><spanclass="keyword">none</span></code> or if the parameter does not exist.</p>
487
487
<p>
488
-
For example, <code>func_arg(range, 'step')</code> returns <code>{name: 'step', type: 'Number', optional: 1, default_value: <spanclass="keyword">none</span>}</code>.</p>
488
+
For example, <code>func_arg(range, 'step')</code> returns <code>{name: 'step', type: '<spanclass="keyword">number</span>', optional: 1, default_value: <spanclass="keyword">none</span>}</code>.</p>
Returns an array of 3 values (red, green and blue) if the given array contains 3 values or less. Returns an array of 4 values (red, green, blue and brightness) if the given array contains 4 values or more. The first 3 values are clamped to the 0-255 range (inclusive), and all values are rounded to the nearest integer value. If a value can't be converted or is missing, <code>0</code> is used instead. This function can be used to 'sanitize' colors.</p>
504
504
<p>
505
-
For example, <code>color('100', 300, 150.4)</code> returns <code>[100, 255, 150]</code>.</p>
505
+
For example, <code>color(['100', 300, 150.4])</code> returns <code>[100, 255, 150]</code>.</p>
0 commit comments