• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## collections.after_each
2
3<pre>
4collections.after_each(<a href="#collections.after_each-separator">separator</a>, <a href="#collections.after_each-iterable">iterable</a>)
5</pre>
6
7Inserts `separator` after each item in `iterable`.
8
9### Parameters
10
11<table class="params-table">
12  <colgroup>
13    <col class="col-param" />
14    <col class="col-description" />
15  </colgroup>
16  <tbody>
17    <tr id="collections.after_each-separator">
18      <td><code>separator</code></td>
19      <td>
20        required.
21        <p>
22          The value to insert after each item in `iterable`.
23        </p>
24      </td>
25    </tr>
26    <tr id="collections.after_each-iterable">
27      <td><code>iterable</code></td>
28      <td>
29        required.
30        <p>
31          The list into which to intersperse the separator.
32        </p>
33      </td>
34    </tr>
35  </tbody>
36</table>
37
38
39## collections.before_each
40
41<pre>
42collections.before_each(<a href="#collections.before_each-separator">separator</a>, <a href="#collections.before_each-iterable">iterable</a>)
43</pre>
44
45Inserts `separator` before each item in `iterable`.
46
47### Parameters
48
49<table class="params-table">
50  <colgroup>
51    <col class="col-param" />
52    <col class="col-description" />
53  </colgroup>
54  <tbody>
55    <tr id="collections.before_each-separator">
56      <td><code>separator</code></td>
57      <td>
58        required.
59        <p>
60          The value to insert before each item in `iterable`.
61        </p>
62      </td>
63    </tr>
64    <tr id="collections.before_each-iterable">
65      <td><code>iterable</code></td>
66      <td>
67        required.
68        <p>
69          The list into which to intersperse the separator.
70        </p>
71      </td>
72    </tr>
73  </tbody>
74</table>
75
76
77## collections.uniq
78
79<pre>
80collections.uniq(<a href="#collections.uniq-iterable">iterable</a>)
81</pre>
82
83Returns a list of unique elements in `iterable`.
84
85Requires all the elements to be hashable.
86
87
88### Parameters
89
90<table class="params-table">
91  <colgroup>
92    <col class="col-param" />
93    <col class="col-description" />
94  </colgroup>
95  <tbody>
96    <tr id="collections.uniq-iterable">
97      <td><code>iterable</code></td>
98      <td>
99        required.
100        <p>
101          An iterable to filter.
102        </p>
103      </td>
104    </tr>
105  </tbody>
106</table>
107
108
109