@@ -14,8 +14,6 @@ discard block |
||
14 | 14 | * |
15 | 15 | * @stream |
16 | 16 | * @signature String -> String -> [String] |
17 | - * @param string $delimiter |
|
18 | - * @param string $string |
|
19 | 17 | * @return array |
20 | 18 | */ |
21 | 19 | function split() { |
@@ -34,8 +32,6 @@ discard block |
||
34 | 32 | * |
35 | 33 | * @stream |
36 | 34 | * @signature String -> [String] -> String |
37 | - * @param string $glue |
|
38 | - * @param array $pieces |
|
39 | 35 | * @return string |
40 | 36 | */ |
41 | 37 | function join() { |
@@ -59,9 +55,6 @@ discard block |
||
59 | 55 | * |
60 | 56 | * @stream |
61 | 57 | * @signature String|[String] -> String|[String] -> String -> String |
62 | - * @param string $search |
|
63 | - * @param string $replacement |
|
64 | - * @param string $string |
|
65 | 58 | * @return string |
66 | 59 | */ |
67 | 60 | function replace() { |
@@ -81,9 +74,6 @@ discard block |
||
81 | 74 | * |
82 | 75 | * @stream |
83 | 76 | * @signature String -> String -> String -> String |
84 | - * @param string $pattern |
|
85 | - * @param string $replacement |
|
86 | - * @param string $string |
|
87 | 77 | * @return string |
88 | 78 | */ |
89 | 79 | function regReplace() { |
@@ -101,7 +91,6 @@ discard block |
||
101 | 91 | * |
102 | 92 | * @stream |
103 | 93 | * @signature String -> String |
104 | - * @param string $string |
|
105 | 94 | * @return string |
106 | 95 | */ |
107 | 96 | function upperCase() { |
@@ -119,7 +108,6 @@ discard block |
||
119 | 108 | * |
120 | 109 | * @stream |
121 | 110 | * @signature String -> String |
122 | - * @param string $string |
|
123 | 111 | * @return string |
124 | 112 | */ |
125 | 113 | function lowerCase() { |
@@ -137,7 +125,6 @@ discard block |
||
137 | 125 | * |
138 | 126 | * @stream |
139 | 127 | * @signature String -> String |
140 | - * @param string $string |
|
141 | 128 | * @return string |
142 | 129 | */ |
143 | 130 | function camelCase() { |
@@ -164,8 +151,6 @@ discard block |
||
164 | 151 | * |
165 | 152 | * @stream |
166 | 153 | * @signature String -> String -> String |
167 | - * @param string $delimiter |
|
168 | - * @param string $string |
|
169 | 154 | * @return string |
170 | 155 | */ |
171 | 156 | function snakeCase() { |
@@ -194,8 +179,6 @@ discard block |
||
194 | 179 | * |
195 | 180 | * @stream |
196 | 181 | * @signature String -> String -> Boolean |
197 | - * @param string $token |
|
198 | - * @param string $string |
|
199 | 182 | * @return bool |
200 | 183 | */ |
201 | 184 | function startsWith() { |
@@ -220,8 +203,6 @@ discard block |
||
220 | 203 | * |
221 | 204 | * @stream |
222 | 205 | * @signature String -> String -> Boolean |
223 | - * @param string $token |
|
224 | - * @param string $string |
|
225 | 206 | * @return bool |
226 | 207 | */ |
227 | 208 | function endsWith() { |
@@ -246,8 +227,6 @@ discard block |
||
246 | 227 | * |
247 | 228 | * @stream |
248 | 229 | * @signature String -> String -> Boolean |
249 | - * @param string $pattern |
|
250 | - * @param string $string |
|
251 | 230 | * @return bool |
252 | 231 | */ |
253 | 232 | function test() { |
@@ -270,8 +249,6 @@ discard block |
||
270 | 249 | * |
271 | 250 | * @stream |
272 | 251 | * @signature String -> String -> [String] |
273 | - * @param string $pattern |
|
274 | - * @param string $string |
|
275 | 252 | * @return array |
276 | 253 | */ |
277 | 254 | function match() { |
@@ -295,8 +272,6 @@ discard block |
||
295 | 272 | * |
296 | 273 | * @stream |
297 | 274 | * @signature String -> String -> Number |
298 | - * @param string $token |
|
299 | - * @param string $text |
|
300 | 275 | * @return int |
301 | 276 | */ |
302 | 277 | function occurences() { |
@@ -322,9 +297,6 @@ discard block |
||
322 | 297 | * |
323 | 298 | * @stream |
324 | 299 | * @signature String -> String -> String -> [String] |
325 | - * @param string $surrounders |
|
326 | - * @param string $separator |
|
327 | - * @param sring $text |
|
328 | 300 | * @return array |
329 | 301 | */ |
330 | 302 | function chunks() { |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | function join() { |
42 | 42 | static $join = false; |
43 | - $join = $join ?: curry(function($glue, $pieces){ |
|
43 | + $join = $join ?: curry(function($glue, $pieces) { |
|
44 | 44 | return implode($glue, $pieces); |
45 | 45 | }); |
46 | 46 | return _apply($join, func_get_args()); |
@@ -358,8 +358,7 @@ discard block |
||
358 | 358 | $updateCountAt = curry(function($item, $counts, $index) use($openings, $closings) { |
359 | 359 | $count = occurences(__(), $item); |
360 | 360 | return ($openings[$index] == $closings[$index]) ? |
361 | - ($counts[$index] + $count($openings[$index])) % 2 : |
|
362 | - $counts[$index] + $count($openings[$index]) - $count($closings[$index]); |
|
361 | + ($counts[$index] + $count($openings[$index])) % 2 : $counts[$index] + $count($openings[$index]) - $count($closings[$index]); |
|
363 | 362 | }); |
364 | 363 | // Updates counts for all surrenders |
365 | 364 | $updateCounts = curry(function($item, $counts) use($indexes, $updateCountAt) { |
@@ -3,123 +3,123 @@ |
||
3 | 3 | use Tarsana\Functional as F; |
4 | 4 | |
5 | 5 | return F\map(F\apply(F\_f('_stream_operation')), [ |
6 | - ['then', 'Function -> Any -> Any', F\_f('_stream_then')], |
|
7 | - ['and', 'Boolean -> Boolean -> Boolean', F\and_()], |
|
8 | - ['or', 'Boolean -> Boolean -> Boolean', F\or_()], |
|
9 | - ['not', 'Boolean -> Boolean', F\not()], |
|
10 | - ['eq', 'Any -> Any -> Boolean', F\eq()], |
|
11 | - ['notEq', 'Any -> Any -> Boolean', F\notEq()], |
|
12 | - ['eqq', 'Any -> Any -> Boolean', F\eqq()], |
|
13 | - ['notEqq', 'Any -> Any -> Boolean', F\notEqq()], |
|
14 | - ['equals', 'Any -> Any -> Boolean', F\equals()], |
|
15 | - ['equalBy', 'Function -> Any -> Any -> Boolean', F\equalBy()], |
|
16 | - ['lt', 'Any -> Any -> Boolean', F\lt()], |
|
17 | - ['lte', 'Any -> Any -> Boolean', F\lte()], |
|
18 | - ['gt', 'Any -> Any -> Boolean', F\gt()], |
|
19 | - ['gte', 'Any -> Any -> Boolean', F\gte()], |
|
20 | - ['is', 'String -> Any -> Boolean', F\is()], |
|
21 | - ['toString', 'Any -> String', F\toString()], |
|
22 | - ['attributes', 'Object|Array -> Object|Array', F\attributes()], |
|
23 | - ['keys', 'List -> List', F\keys()], |
|
24 | - ['keys', 'Object|Array -> List', F\keys()], |
|
25 | - ['values', 'List -> List', F\values()], |
|
26 | - ['values', 'Object|Array -> List', F\values()], |
|
27 | - ['has', 'Any -> Object|Array -> Boolean', F\has()], |
|
28 | - ['get', 'Any -> Object|Array -> Any', F\get()], |
|
29 | - ['getPath', 'List -> Object|Array -> Any', F\getPath()], |
|
30 | - ['set', 'Any -> Any -> Object|Array -> Object|Array', F\set()], |
|
31 | - ['update', 'Any -> Function -> Object|Array -> Object|Array', F\update()], |
|
32 | - ['satisfies', 'Function -> Any -> Object|Array -> Boolean', F\satisfies()], |
|
33 | - ['satisfiesAll', 'Object|Array -> Object|Array -> Boolean', F\satisfiesAll()], |
|
34 | - ['satisfiesAny', 'Object|Array -> Object|Array -> Boolean', F\satisfiesAny()], |
|
35 | - ['toPairs', 'Object|Array -> List', F\toPairs()], |
|
36 | - ['split', 'String -> String -> List', F\split()], |
|
37 | - ['join', 'String -> List -> String', F\join()], |
|
38 | - ['replace', 'String|List -> String|List -> String -> String', F\replace()], |
|
39 | - ['regReplace', 'String -> String -> String -> String', F\regReplace()], |
|
40 | - ['upperCase', 'String -> String', F\upperCase()], |
|
41 | - ['lowerCase', 'String -> String', F\lowerCase()], |
|
42 | - ['camelCase', 'String -> String', F\camelCase()], |
|
43 | - ['snakeCase', 'String -> String -> String', F\snakeCase()], |
|
44 | - ['startsWith', 'String -> String -> Boolean', F\startsWith()], |
|
45 | - ['endsWith', 'String -> String -> Boolean', F\endsWith()], |
|
46 | - ['test', 'String -> String -> Boolean', F\test()], |
|
47 | - ['match', 'String -> String -> List', F\match()], |
|
48 | - ['occurences', 'String -> String -> Number', F\occurences()], |
|
49 | - ['chunks', 'String -> String -> String -> List', F\chunks()], |
|
50 | - ['map', 'Function -> List -> List', F\map()], |
|
51 | - ['chain', 'Function -> List -> List', F\chain()], |
|
52 | - ['filter', 'Function -> List -> List', F\filter()], |
|
53 | - ['reduce', 'Function -> Any -> List -> Any', F\reduce()], |
|
54 | - ['each', 'Function -> List -> List', F\each()], |
|
55 | - ['head', 'List -> Any', F\head()], |
|
56 | - ['head', 'String -> String', F\head()], |
|
57 | - ['last', 'List -> Any', F\last()], |
|
58 | - ['last', 'String -> String', F\last()], |
|
59 | - ['init', 'List -> Any', F\init()], |
|
60 | - ['init', 'String -> String', F\init()], |
|
61 | - ['tail', 'List -> Any', F\tail()], |
|
62 | - ['tail', 'String -> String', F\tail()], |
|
63 | - ['reverse', 'List -> List', F\reverse()], |
|
64 | - ['reverse', 'String -> String', F\reverse()], |
|
65 | - ['length', 'List -> Number', F\length()], |
|
66 | - ['length', 'String -> Number', F\length()], |
|
67 | - ['allSatisfies', 'Function -> List -> Boolean', F\allSatisfies()], |
|
68 | - ['anySatisfies', 'Function -> List -> Boolean', F\anySatisfies()], |
|
69 | - ['concat', 'List -> List -> List', F\concat()], |
|
70 | - ['concat', 'String -> String -> String', F\concat()], |
|
71 | - ['concatAll', 'List -> List', F\concatAll()], |
|
72 | - ['insert', 'Number -> Any -> List -> List', F\insert()], |
|
73 | - ['insert', 'Number -> String -> String -> String', F\insert()], |
|
74 | - ['insertAll', 'Number -> List -> List -> List', F\insertAll()], |
|
75 | - ['insertAll', 'Number -> String -> String -> String', F\insertAll()], |
|
76 | - ['append', 'Any -> List -> List', F\append()], |
|
77 | - ['append', 'String -> String -> String', F\append()], |
|
78 | - ['prepend', 'Any -> List -> List', F\prepend()], |
|
79 | - ['prepend', 'String -> String -> String', F\prepend()], |
|
80 | - ['take', 'Number -> List -> List', F\take()], |
|
81 | - ['take', 'Number -> String -> String', F\take()], |
|
82 | - ['takeWhile', 'Function -> List -> List', F\takeWhile()], |
|
83 | - ['takeLastWhile', 'Function -> List -> List', F\takeLastWhile()], |
|
84 | - ['takeUntil', 'Function -> List -> List', F\takeUntil()], |
|
85 | - ['takeLastUntil', 'Function -> List -> List', F\takeLastUntil()], |
|
86 | - ['remove', 'Number -> List -> List', F\remove()], |
|
87 | - ['remove', 'Number -> String -> String', F\remove()], |
|
88 | - ['removeWhile', 'Function -> List -> List', F\removeWhile()], |
|
89 | - ['removeLastWhile', 'Function -> List -> List', F\removeLastWhile()], |
|
90 | - ['removeUntil', 'Function -> List -> List', F\removeUntil()], |
|
91 | - ['removeLastUntil', 'Function -> List -> List', F\removeLastUntil()], |
|
92 | - ['fromPairs', 'List -> Object|Array', F\fromPairs()], |
|
93 | - ['slices', 'Number -> List -> List', F\slices()], |
|
94 | - ['slices', 'Number -> String -> List', F\slices()], |
|
95 | - ['contains', 'Any -> List -> Boolean', F\contains()], |
|
96 | - ['contains', 'String -> String -> Boolean', F\contains()], |
|
97 | - ['findIndex', 'Function -> List -> Number|Null', F\findIndex()], |
|
98 | - ['findIndex', 'Function -> Object|Array -> Any', F\findIndex()], |
|
99 | - ['findLastIndex', 'Function -> List -> Number|Null', F\findLastIndex()], |
|
100 | - ['findLastIndex', 'Function -> Object|Array -> Any', F\findLastIndex()], |
|
101 | - ['find', 'Function -> List -> Any', F\find()], |
|
102 | - ['findLast', 'Function -> List -> Any', F\findLast()], |
|
103 | - ['indexOf', 'Any -> List -> Number', F\indexOf()], |
|
104 | - ['indexOf', 'Any -> Object|Array -> Any', F\indexOf()], |
|
105 | - ['indexOf', 'String -> String -> Number', F\indexOf()], |
|
106 | - ['lastIndexOf', 'Any -> List -> Number', F\lastIndexOf()], |
|
107 | - ['lastIndexOf', 'String -> String -> Number', F\lastIndexOf()], |
|
108 | - ['uniqueBy', 'Function -> List -> List', F\uniqueBy()], |
|
109 | - ['unique', 'List -> List', F\unique()], |
|
110 | - ['groupBy', 'Function -> List -> Object|Array', F\groupBy()], |
|
111 | - ['pairsFrom', 'List -> List -> List', F\pairsFrom()], |
|
112 | - ['plus', 'Number -> Number -> Number', F\plus()], |
|
113 | - ['minus', 'Number -> Number -> Number', F\minus()], |
|
114 | - ['negate', 'Number -> Number', F\negate()], |
|
115 | - ['multiply', 'Number -> Number -> Number', F\multiply()], |
|
116 | - ['divide', 'Number -> Number -> Number', F\divide()], |
|
117 | - ['modulo', 'Number -> Number -> Number', F\modulo()], |
|
118 | - ['sum', 'List -> Number', F\sum()], |
|
119 | - ['product', 'List -> Number', F\product()], |
|
120 | - ['min', 'Number -> Number -> Number', F\min()], |
|
121 | - ['minBy', 'Function -> Any -> Any -> Any', F\minBy()], |
|
122 | - ['max', 'Number -> Number -> Number', F\max()], |
|
123 | - ['maxBy', 'Function -> Any -> Any -> Any', F\maxBy()], |
|
6 | + ['then', 'Function -> Any -> Any', F\_f('_stream_then')], |
|
7 | + ['and', 'Boolean -> Boolean -> Boolean', F\and_()], |
|
8 | + ['or', 'Boolean -> Boolean -> Boolean', F\or_()], |
|
9 | + ['not', 'Boolean -> Boolean', F\not()], |
|
10 | + ['eq', 'Any -> Any -> Boolean', F\eq()], |
|
11 | + ['notEq', 'Any -> Any -> Boolean', F\notEq()], |
|
12 | + ['eqq', 'Any -> Any -> Boolean', F\eqq()], |
|
13 | + ['notEqq', 'Any -> Any -> Boolean', F\notEqq()], |
|
14 | + ['equals', 'Any -> Any -> Boolean', F\equals()], |
|
15 | + ['equalBy', 'Function -> Any -> Any -> Boolean', F\equalBy()], |
|
16 | + ['lt', 'Any -> Any -> Boolean', F\lt()], |
|
17 | + ['lte', 'Any -> Any -> Boolean', F\lte()], |
|
18 | + ['gt', 'Any -> Any -> Boolean', F\gt()], |
|
19 | + ['gte', 'Any -> Any -> Boolean', F\gte()], |
|
20 | + ['is', 'String -> Any -> Boolean', F\is()], |
|
21 | + ['toString', 'Any -> String', F\toString()], |
|
22 | + ['attributes', 'Object|Array -> Object|Array', F\attributes()], |
|
23 | + ['keys', 'List -> List', F\keys()], |
|
24 | + ['keys', 'Object|Array -> List', F\keys()], |
|
25 | + ['values', 'List -> List', F\values()], |
|
26 | + ['values', 'Object|Array -> List', F\values()], |
|
27 | + ['has', 'Any -> Object|Array -> Boolean', F\has()], |
|
28 | + ['get', 'Any -> Object|Array -> Any', F\get()], |
|
29 | + ['getPath', 'List -> Object|Array -> Any', F\getPath()], |
|
30 | + ['set', 'Any -> Any -> Object|Array -> Object|Array', F\set()], |
|
31 | + ['update', 'Any -> Function -> Object|Array -> Object|Array', F\update()], |
|
32 | + ['satisfies', 'Function -> Any -> Object|Array -> Boolean', F\satisfies()], |
|
33 | + ['satisfiesAll', 'Object|Array -> Object|Array -> Boolean', F\satisfiesAll()], |
|
34 | + ['satisfiesAny', 'Object|Array -> Object|Array -> Boolean', F\satisfiesAny()], |
|
35 | + ['toPairs', 'Object|Array -> List', F\toPairs()], |
|
36 | + ['split', 'String -> String -> List', F\split()], |
|
37 | + ['join', 'String -> List -> String', F\join()], |
|
38 | + ['replace', 'String|List -> String|List -> String -> String', F\replace()], |
|
39 | + ['regReplace', 'String -> String -> String -> String', F\regReplace()], |
|
40 | + ['upperCase', 'String -> String', F\upperCase()], |
|
41 | + ['lowerCase', 'String -> String', F\lowerCase()], |
|
42 | + ['camelCase', 'String -> String', F\camelCase()], |
|
43 | + ['snakeCase', 'String -> String -> String', F\snakeCase()], |
|
44 | + ['startsWith', 'String -> String -> Boolean', F\startsWith()], |
|
45 | + ['endsWith', 'String -> String -> Boolean', F\endsWith()], |
|
46 | + ['test', 'String -> String -> Boolean', F\test()], |
|
47 | + ['match', 'String -> String -> List', F\match()], |
|
48 | + ['occurences', 'String -> String -> Number', F\occurences()], |
|
49 | + ['chunks', 'String -> String -> String -> List', F\chunks()], |
|
50 | + ['map', 'Function -> List -> List', F\map()], |
|
51 | + ['chain', 'Function -> List -> List', F\chain()], |
|
52 | + ['filter', 'Function -> List -> List', F\filter()], |
|
53 | + ['reduce', 'Function -> Any -> List -> Any', F\reduce()], |
|
54 | + ['each', 'Function -> List -> List', F\each()], |
|
55 | + ['head', 'List -> Any', F\head()], |
|
56 | + ['head', 'String -> String', F\head()], |
|
57 | + ['last', 'List -> Any', F\last()], |
|
58 | + ['last', 'String -> String', F\last()], |
|
59 | + ['init', 'List -> Any', F\init()], |
|
60 | + ['init', 'String -> String', F\init()], |
|
61 | + ['tail', 'List -> Any', F\tail()], |
|
62 | + ['tail', 'String -> String', F\tail()], |
|
63 | + ['reverse', 'List -> List', F\reverse()], |
|
64 | + ['reverse', 'String -> String', F\reverse()], |
|
65 | + ['length', 'List -> Number', F\length()], |
|
66 | + ['length', 'String -> Number', F\length()], |
|
67 | + ['allSatisfies', 'Function -> List -> Boolean', F\allSatisfies()], |
|
68 | + ['anySatisfies', 'Function -> List -> Boolean', F\anySatisfies()], |
|
69 | + ['concat', 'List -> List -> List', F\concat()], |
|
70 | + ['concat', 'String -> String -> String', F\concat()], |
|
71 | + ['concatAll', 'List -> List', F\concatAll()], |
|
72 | + ['insert', 'Number -> Any -> List -> List', F\insert()], |
|
73 | + ['insert', 'Number -> String -> String -> String', F\insert()], |
|
74 | + ['insertAll', 'Number -> List -> List -> List', F\insertAll()], |
|
75 | + ['insertAll', 'Number -> String -> String -> String', F\insertAll()], |
|
76 | + ['append', 'Any -> List -> List', F\append()], |
|
77 | + ['append', 'String -> String -> String', F\append()], |
|
78 | + ['prepend', 'Any -> List -> List', F\prepend()], |
|
79 | + ['prepend', 'String -> String -> String', F\prepend()], |
|
80 | + ['take', 'Number -> List -> List', F\take()], |
|
81 | + ['take', 'Number -> String -> String', F\take()], |
|
82 | + ['takeWhile', 'Function -> List -> List', F\takeWhile()], |
|
83 | + ['takeLastWhile', 'Function -> List -> List', F\takeLastWhile()], |
|
84 | + ['takeUntil', 'Function -> List -> List', F\takeUntil()], |
|
85 | + ['takeLastUntil', 'Function -> List -> List', F\takeLastUntil()], |
|
86 | + ['remove', 'Number -> List -> List', F\remove()], |
|
87 | + ['remove', 'Number -> String -> String', F\remove()], |
|
88 | + ['removeWhile', 'Function -> List -> List', F\removeWhile()], |
|
89 | + ['removeLastWhile', 'Function -> List -> List', F\removeLastWhile()], |
|
90 | + ['removeUntil', 'Function -> List -> List', F\removeUntil()], |
|
91 | + ['removeLastUntil', 'Function -> List -> List', F\removeLastUntil()], |
|
92 | + ['fromPairs', 'List -> Object|Array', F\fromPairs()], |
|
93 | + ['slices', 'Number -> List -> List', F\slices()], |
|
94 | + ['slices', 'Number -> String -> List', F\slices()], |
|
95 | + ['contains', 'Any -> List -> Boolean', F\contains()], |
|
96 | + ['contains', 'String -> String -> Boolean', F\contains()], |
|
97 | + ['findIndex', 'Function -> List -> Number|Null', F\findIndex()], |
|
98 | + ['findIndex', 'Function -> Object|Array -> Any', F\findIndex()], |
|
99 | + ['findLastIndex', 'Function -> List -> Number|Null', F\findLastIndex()], |
|
100 | + ['findLastIndex', 'Function -> Object|Array -> Any', F\findLastIndex()], |
|
101 | + ['find', 'Function -> List -> Any', F\find()], |
|
102 | + ['findLast', 'Function -> List -> Any', F\findLast()], |
|
103 | + ['indexOf', 'Any -> List -> Number', F\indexOf()], |
|
104 | + ['indexOf', 'Any -> Object|Array -> Any', F\indexOf()], |
|
105 | + ['indexOf', 'String -> String -> Number', F\indexOf()], |
|
106 | + ['lastIndexOf', 'Any -> List -> Number', F\lastIndexOf()], |
|
107 | + ['lastIndexOf', 'String -> String -> Number', F\lastIndexOf()], |
|
108 | + ['uniqueBy', 'Function -> List -> List', F\uniqueBy()], |
|
109 | + ['unique', 'List -> List', F\unique()], |
|
110 | + ['groupBy', 'Function -> List -> Object|Array', F\groupBy()], |
|
111 | + ['pairsFrom', 'List -> List -> List', F\pairsFrom()], |
|
112 | + ['plus', 'Number -> Number -> Number', F\plus()], |
|
113 | + ['minus', 'Number -> Number -> Number', F\minus()], |
|
114 | + ['negate', 'Number -> Number', F\negate()], |
|
115 | + ['multiply', 'Number -> Number -> Number', F\multiply()], |
|
116 | + ['divide', 'Number -> Number -> Number', F\divide()], |
|
117 | + ['modulo', 'Number -> Number -> Number', F\modulo()], |
|
118 | + ['sum', 'List -> Number', F\sum()], |
|
119 | + ['product', 'List -> Number', F\product()], |
|
120 | + ['min', 'Number -> Number -> Number', F\min()], |
|
121 | + ['minBy', 'Function -> Any -> Any -> Any', F\minBy()], |
|
122 | + ['max', 'Number -> Number -> Number', F\max()], |
|
123 | + ['maxBy', 'Function -> Any -> Any -> Any', F\maxBy()], |
|
124 | 124 | |
125 | 125 | ]); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * @param Error|null $error |
19 | 19 | * @return Error |
20 | 20 | */ |
21 | - public static function of ($message, $code = 0, Error $error = null) |
|
21 | + public static function of($message, $code = 0, Error $error = null) |
|
22 | 22 | { |
23 | 23 | return new Error($message, $code, $error); |
24 | 24 | } |
@@ -8,14 +8,14 @@ |
||
8 | 8 | */ |
9 | 9 | class Placeholder { |
10 | 10 | private static $instance; |
11 | - private function __construct(){} |
|
11 | + private function __construct() {} |
|
12 | 12 | public static function get() |
13 | 13 | { |
14 | - if(static::$instance === null) |
|
14 | + if (static::$instance === null) |
|
15 | 15 | static::$instance = new Placeholder; |
16 | 16 | return static::$instance; |
17 | 17 | } |
18 | - public function __toString(){ |
|
18 | + public function __toString() { |
|
19 | 19 | return '__'; |
20 | 20 | } |
21 | 21 | } |
@@ -11,8 +11,9 @@ |
||
11 | 11 | private function __construct(){} |
12 | 12 | public static function get() |
13 | 13 | { |
14 | - if(static::$instance === null) |
|
15 | - static::$instance = new Placeholder; |
|
14 | + if(static::$instance === null) { |
|
15 | + static::$instance = new Placeholder; |
|
16 | + } |
|
16 | 17 | return static::$instance; |
17 | 18 | } |
18 | 19 | public function __toString(){ |