@@ -3,7 +3,7 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * Returns the list of scripts to compare. |
| 5 | 5 | * |
| 6 | - * @return array |
|
| 6 | + * @return string[] |
|
| 7 | 7 | */ |
| 8 | 8 | function scripts() { |
| 9 | 9 | return [ |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * and returns its running time in miliseconds. |
| 102 | 102 | * |
| 103 | 103 | * @param string $path |
| 104 | - * @return array |
|
| 104 | + * @return double |
|
| 105 | 105 | */ |
| 106 | 106 | function execute($path, $input) { |
| 107 | 107 | $start = microtime(true); |
@@ -72,8 +72,6 @@ discard block |
||
| 72 | 72 | * ``` |
| 73 | 73 | * |
| 74 | 74 | * @signature (*... -> a) -> [*] -> a |
| 75 | - * @param callable $fn |
|
| 76 | - * @param array $args |
|
| 77 | 75 | * @return mixed |
| 78 | 76 | */ |
| 79 | 77 | function apply() { |
@@ -97,7 +95,6 @@ discard block |
||
| 97 | 95 | * ``` |
| 98 | 96 | * |
| 99 | 97 | * @signature (((a, b, ...) -> o), (o -> p), ..., (y -> z)) -> ((a, b, ...) -> z) |
| 100 | - * @param callable $fns... |
|
| 101 | 98 | * @return callable |
| 102 | 99 | */ |
| 103 | 100 | function pipe() { |
@@ -145,7 +142,6 @@ discard block |
||
| 145 | 142 | * ``` |
| 146 | 143 | * |
| 147 | 144 | * @signature a -> (* -> a) |
| 148 | - * @param mixed $value |
|
| 149 | 145 | * @return callable |
| 150 | 146 | */ |
| 151 | 147 | function give() { |
@@ -174,7 +170,6 @@ discard block |
||
| 174 | 170 | * ``` |
| 175 | 171 | * |
| 176 | 172 | * @signature ((a -> Boolean), ..., (a -> Boolean)) -> (a -> Boolean) |
| 177 | - * @param callable $predicates... |
|
| 178 | 173 | * @return callable |
| 179 | 174 | */ |
| 180 | 175 | function all() { |
@@ -208,7 +203,6 @@ discard block |
||
| 208 | 203 | * ``` |
| 209 | 204 | * |
| 210 | 205 | * @signature ((a -> Boolean), ..., (a -> Boolean)) -> (a -> Boolean) |
| 211 | - * @param callable $predicates... |
|
| 212 | 206 | * @return callable |
| 213 | 207 | */ |
| 214 | 208 | function any() { |
@@ -239,7 +233,6 @@ discard block |
||
| 239 | 233 | * ``` |
| 240 | 234 | * |
| 241 | 235 | * @signature (* -> ... -> *) -> (* -> ... -> Boolean) |
| 242 | - * @param callable $fn |
|
| 243 | 236 | * @return callable |
| 244 | 237 | */ |
| 245 | 238 | function complement() { |
@@ -272,7 +265,6 @@ discard block |
||
| 272 | 265 | * ``` |
| 273 | 266 | * |
| 274 | 267 | * @signature (a -> a -> Boolean) -> (a -> a -> Number) |
| 275 | - * @param callable $fn |
|
| 276 | 268 | * @return callable |
| 277 | 269 | */ |
| 278 | 270 | function comparator() { |
@@ -336,10 +336,10 @@ |
||
| 336 | 336 | // $text = 'foo ("bar baz" alpha) beta' |
| 337 | 337 | $counters = [ |
| 338 | 338 | 'values' => [], // each item of this array refers to the number |
| 339 | - // of closings needed for an opening |
|
| 339 | + // of closings needed for an opening |
|
| 340 | 340 | 'openings' => [], // an associative array where the key is an opening |
| 341 | - // and the value is the index of corresponding cell |
|
| 342 | - // in the 'values' field |
|
| 341 | + // and the value is the index of corresponding cell |
|
| 342 | + // in the 'values' field |
|
| 343 | 343 | 'closings' => [], // associative array for closings like the previous one |
| 344 | 344 | 'total' => 0 // the total number of needed closings |
| 345 | 345 | ]; |
@@ -3,127 +3,127 @@ |
||
| 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 | - ['toPairs', 'List -> List', F\toPairs()], |
|
| 37 | - ['split', 'String -> String -> List', F\split()], |
|
| 38 | - ['join', 'String -> List -> String', F\join()], |
|
| 39 | - ['replace', 'String|List -> String|List -> String -> String', F\replace()], |
|
| 40 | - ['regReplace', 'String -> String -> String -> String', F\regReplace()], |
|
| 41 | - ['upperCase', 'String -> String', F\upperCase()], |
|
| 42 | - ['lowerCase', 'String -> String', F\lowerCase()], |
|
| 43 | - ['camelCase', 'String -> String', F\camelCase()], |
|
| 44 | - ['snakeCase', 'String -> String -> String', F\snakeCase()], |
|
| 45 | - ['startsWith', 'String -> String -> Boolean', F\startsWith()], |
|
| 46 | - ['endsWith', 'String -> String -> Boolean', F\endsWith()], |
|
| 47 | - ['test', 'String -> String -> Boolean', F\test()], |
|
| 48 | - ['match', 'String -> String -> List', F\match()], |
|
| 49 | - ['occurences', 'String -> String -> Number', F\occurences()], |
|
| 50 | - ['chunks', 'String -> String -> String -> List', F\chunks()], |
|
| 51 | - ['map', 'Function -> List -> List', F\map()], |
|
| 52 | - ['map', 'Function -> Object|Array -> Object|Array', F\map()], |
|
| 53 | - ['chain', 'Function -> List -> List', F\chain()], |
|
| 54 | - ['filter', 'Function -> List -> List', F\filter()], |
|
| 55 | - ['reduce', 'Function -> Any -> List -> Any', F\reduce()], |
|
| 56 | - ['each', 'Function -> List -> List', F\each()], |
|
| 57 | - ['head', 'List -> Any', F\head()], |
|
| 58 | - ['head', 'String -> String', F\head()], |
|
| 59 | - ['last', 'List -> Any', F\last()], |
|
| 60 | - ['last', 'String -> String', F\last()], |
|
| 61 | - ['init', 'List -> Any', F\init()], |
|
| 62 | - ['init', 'String -> String', F\init()], |
|
| 63 | - ['tail', 'List -> Any', F\tail()], |
|
| 64 | - ['tail', 'String -> String', F\tail()], |
|
| 65 | - ['reverse', 'List -> List', F\reverse()], |
|
| 66 | - ['reverse', 'String -> String', F\reverse()], |
|
| 67 | - ['length', 'List -> Number', F\length()], |
|
| 68 | - ['length', 'String -> Number', F\length()], |
|
| 69 | - ['allSatisfies', 'Function -> List -> Boolean', F\allSatisfies()], |
|
| 70 | - ['anySatisfies', 'Function -> List -> Boolean', F\anySatisfies()], |
|
| 71 | - ['concat', 'List -> List -> List', F\concat()], |
|
| 72 | - ['concat', 'String -> String -> String', F\concat()], |
|
| 73 | - ['concatAll', 'List -> List', F\concatAll()], |
|
| 74 | - ['insert', 'Number -> Any -> List -> List', F\insert()], |
|
| 75 | - ['insert', 'Number -> String -> String -> String', F\insert()], |
|
| 76 | - ['insertAll', 'Number -> List -> List -> List', F\insertAll()], |
|
| 77 | - ['insertAll', 'Number -> String -> String -> String', F\insertAll()], |
|
| 78 | - ['append', 'Any -> List -> List', F\append()], |
|
| 79 | - ['append', 'String -> String -> String', F\append()], |
|
| 80 | - ['prepend', 'Any -> List -> List', F\prepend()], |
|
| 81 | - ['prepend', 'String -> String -> String', F\prepend()], |
|
| 82 | - ['take', 'Number -> List -> List', F\take()], |
|
| 83 | - ['take', 'Number -> String -> String', F\take()], |
|
| 84 | - ['takeWhile', 'Function -> List -> List', F\takeWhile()], |
|
| 85 | - ['takeLastWhile', 'Function -> List -> List', F\takeLastWhile()], |
|
| 86 | - ['takeUntil', 'Function -> List -> List', F\takeUntil()], |
|
| 87 | - ['takeLastUntil', 'Function -> List -> List', F\takeLastUntil()], |
|
| 88 | - ['remove', 'Number -> List -> List', F\remove()], |
|
| 89 | - ['remove', 'Number -> String -> String', F\remove()], |
|
| 90 | - ['removeWhile', 'Function -> List -> List', F\removeWhile()], |
|
| 91 | - ['removeLastWhile', 'Function -> List -> List', F\removeLastWhile()], |
|
| 92 | - ['removeUntil', 'Function -> List -> List', F\removeUntil()], |
|
| 93 | - ['removeLastUntil', 'Function -> List -> List', F\removeLastUntil()], |
|
| 94 | - ['fromPairs', 'List -> Object|Array', F\fromPairs()], |
|
| 95 | - ['slices', 'Number -> List -> List', F\slices()], |
|
| 96 | - ['slices', 'Number -> String -> List', F\slices()], |
|
| 97 | - ['contains', 'Any -> List -> Boolean', F\contains()], |
|
| 98 | - ['contains', 'String -> String -> Boolean', F\contains()], |
|
| 99 | - ['findIndex', 'Function -> List -> Number|Null', F\findIndex()], |
|
| 100 | - ['findIndex', 'Function -> Object|Array -> Any', F\findIndex()], |
|
| 101 | - ['findLastIndex', 'Function -> List -> Number|Null', F\findLastIndex()], |
|
| 102 | - ['findLastIndex', 'Function -> Object|Array -> Any', F\findLastIndex()], |
|
| 103 | - ['find', 'Function -> List -> Any', F\find()], |
|
| 104 | - ['findLast', 'Function -> List -> Any', F\findLast()], |
|
| 105 | - ['indexOf', 'Any -> List -> Number', F\indexOf()], |
|
| 106 | - ['indexOf', 'Any -> Object|Array -> Any', F\indexOf()], |
|
| 107 | - ['indexOf', 'String -> String -> Number', F\indexOf()], |
|
| 108 | - ['lastIndexOf', 'Any -> List -> Number', F\lastIndexOf()], |
|
| 109 | - ['lastIndexOf', 'Any -> Object|Array -> Any', F\lastIndexOf()], |
|
| 110 | - ['lastIndexOf', 'String -> String -> Number', F\lastIndexOf()], |
|
| 111 | - ['uniqueBy', 'Function -> List -> List', F\uniqueBy()], |
|
| 112 | - ['unique', 'List -> List', F\unique()], |
|
| 113 | - ['groupBy', 'Function -> List -> Object|Array', F\groupBy()], |
|
| 114 | - ['pairsFrom', 'List -> List -> List', F\pairsFrom()], |
|
| 115 | - ['sort', 'Function -> List -> List', F\sort()], |
|
| 116 | - ['plus', 'Number -> Number -> Number', F\plus()], |
|
| 117 | - ['minus', 'Number -> Number -> Number', F\minus()], |
|
| 118 | - ['negate', 'Number -> Number', F\negate()], |
|
| 119 | - ['multiply', 'Number -> Number -> Number', F\multiply()], |
|
| 120 | - ['divide', 'Number -> Number -> Number', F\divide()], |
|
| 121 | - ['modulo', 'Number -> Number -> Number', F\modulo()], |
|
| 122 | - ['sum', 'List -> Number', F\sum()], |
|
| 123 | - ['product', 'List -> Number', F\product()], |
|
| 124 | - ['min', 'Number -> Number -> Number', F\min()], |
|
| 125 | - ['minBy', 'Function -> Any -> Any -> Any', F\minBy()], |
|
| 126 | - ['max', 'Number -> Number -> Number', F\max()], |
|
| 127 | - ['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 | + ['toPairs', 'List -> List', F\toPairs()], |
|
| 37 | + ['split', 'String -> String -> List', F\split()], |
|
| 38 | + ['join', 'String -> List -> String', F\join()], |
|
| 39 | + ['replace', 'String|List -> String|List -> String -> String', F\replace()], |
|
| 40 | + ['regReplace', 'String -> String -> String -> String', F\regReplace()], |
|
| 41 | + ['upperCase', 'String -> String', F\upperCase()], |
|
| 42 | + ['lowerCase', 'String -> String', F\lowerCase()], |
|
| 43 | + ['camelCase', 'String -> String', F\camelCase()], |
|
| 44 | + ['snakeCase', 'String -> String -> String', F\snakeCase()], |
|
| 45 | + ['startsWith', 'String -> String -> Boolean', F\startsWith()], |
|
| 46 | + ['endsWith', 'String -> String -> Boolean', F\endsWith()], |
|
| 47 | + ['test', 'String -> String -> Boolean', F\test()], |
|
| 48 | + ['match', 'String -> String -> List', F\match()], |
|
| 49 | + ['occurences', 'String -> String -> Number', F\occurences()], |
|
| 50 | + ['chunks', 'String -> String -> String -> List', F\chunks()], |
|
| 51 | + ['map', 'Function -> List -> List', F\map()], |
|
| 52 | + ['map', 'Function -> Object|Array -> Object|Array', F\map()], |
|
| 53 | + ['chain', 'Function -> List -> List', F\chain()], |
|
| 54 | + ['filter', 'Function -> List -> List', F\filter()], |
|
| 55 | + ['reduce', 'Function -> Any -> List -> Any', F\reduce()], |
|
| 56 | + ['each', 'Function -> List -> List', F\each()], |
|
| 57 | + ['head', 'List -> Any', F\head()], |
|
| 58 | + ['head', 'String -> String', F\head()], |
|
| 59 | + ['last', 'List -> Any', F\last()], |
|
| 60 | + ['last', 'String -> String', F\last()], |
|
| 61 | + ['init', 'List -> Any', F\init()], |
|
| 62 | + ['init', 'String -> String', F\init()], |
|
| 63 | + ['tail', 'List -> Any', F\tail()], |
|
| 64 | + ['tail', 'String -> String', F\tail()], |
|
| 65 | + ['reverse', 'List -> List', F\reverse()], |
|
| 66 | + ['reverse', 'String -> String', F\reverse()], |
|
| 67 | + ['length', 'List -> Number', F\length()], |
|
| 68 | + ['length', 'String -> Number', F\length()], |
|
| 69 | + ['allSatisfies', 'Function -> List -> Boolean', F\allSatisfies()], |
|
| 70 | + ['anySatisfies', 'Function -> List -> Boolean', F\anySatisfies()], |
|
| 71 | + ['concat', 'List -> List -> List', F\concat()], |
|
| 72 | + ['concat', 'String -> String -> String', F\concat()], |
|
| 73 | + ['concatAll', 'List -> List', F\concatAll()], |
|
| 74 | + ['insert', 'Number -> Any -> List -> List', F\insert()], |
|
| 75 | + ['insert', 'Number -> String -> String -> String', F\insert()], |
|
| 76 | + ['insertAll', 'Number -> List -> List -> List', F\insertAll()], |
|
| 77 | + ['insertAll', 'Number -> String -> String -> String', F\insertAll()], |
|
| 78 | + ['append', 'Any -> List -> List', F\append()], |
|
| 79 | + ['append', 'String -> String -> String', F\append()], |
|
| 80 | + ['prepend', 'Any -> List -> List', F\prepend()], |
|
| 81 | + ['prepend', 'String -> String -> String', F\prepend()], |
|
| 82 | + ['take', 'Number -> List -> List', F\take()], |
|
| 83 | + ['take', 'Number -> String -> String', F\take()], |
|
| 84 | + ['takeWhile', 'Function -> List -> List', F\takeWhile()], |
|
| 85 | + ['takeLastWhile', 'Function -> List -> List', F\takeLastWhile()], |
|
| 86 | + ['takeUntil', 'Function -> List -> List', F\takeUntil()], |
|
| 87 | + ['takeLastUntil', 'Function -> List -> List', F\takeLastUntil()], |
|
| 88 | + ['remove', 'Number -> List -> List', F\remove()], |
|
| 89 | + ['remove', 'Number -> String -> String', F\remove()], |
|
| 90 | + ['removeWhile', 'Function -> List -> List', F\removeWhile()], |
|
| 91 | + ['removeLastWhile', 'Function -> List -> List', F\removeLastWhile()], |
|
| 92 | + ['removeUntil', 'Function -> List -> List', F\removeUntil()], |
|
| 93 | + ['removeLastUntil', 'Function -> List -> List', F\removeLastUntil()], |
|
| 94 | + ['fromPairs', 'List -> Object|Array', F\fromPairs()], |
|
| 95 | + ['slices', 'Number -> List -> List', F\slices()], |
|
| 96 | + ['slices', 'Number -> String -> List', F\slices()], |
|
| 97 | + ['contains', 'Any -> List -> Boolean', F\contains()], |
|
| 98 | + ['contains', 'String -> String -> Boolean', F\contains()], |
|
| 99 | + ['findIndex', 'Function -> List -> Number|Null', F\findIndex()], |
|
| 100 | + ['findIndex', 'Function -> Object|Array -> Any', F\findIndex()], |
|
| 101 | + ['findLastIndex', 'Function -> List -> Number|Null', F\findLastIndex()], |
|
| 102 | + ['findLastIndex', 'Function -> Object|Array -> Any', F\findLastIndex()], |
|
| 103 | + ['find', 'Function -> List -> Any', F\find()], |
|
| 104 | + ['findLast', 'Function -> List -> Any', F\findLast()], |
|
| 105 | + ['indexOf', 'Any -> List -> Number', F\indexOf()], |
|
| 106 | + ['indexOf', 'Any -> Object|Array -> Any', F\indexOf()], |
|
| 107 | + ['indexOf', 'String -> String -> Number', F\indexOf()], |
|
| 108 | + ['lastIndexOf', 'Any -> List -> Number', F\lastIndexOf()], |
|
| 109 | + ['lastIndexOf', 'Any -> Object|Array -> Any', F\lastIndexOf()], |
|
| 110 | + ['lastIndexOf', 'String -> String -> Number', F\lastIndexOf()], |
|
| 111 | + ['uniqueBy', 'Function -> List -> List', F\uniqueBy()], |
|
| 112 | + ['unique', 'List -> List', F\unique()], |
|
| 113 | + ['groupBy', 'Function -> List -> Object|Array', F\groupBy()], |
|
| 114 | + ['pairsFrom', 'List -> List -> List', F\pairsFrom()], |
|
| 115 | + ['sort', 'Function -> List -> List', F\sort()], |
|
| 116 | + ['plus', 'Number -> Number -> Number', F\plus()], |
|
| 117 | + ['minus', 'Number -> Number -> Number', F\minus()], |
|
| 118 | + ['negate', 'Number -> Number', F\negate()], |
|
| 119 | + ['multiply', 'Number -> Number -> Number', F\multiply()], |
|
| 120 | + ['divide', 'Number -> Number -> Number', F\divide()], |
|
| 121 | + ['modulo', 'Number -> Number -> Number', F\modulo()], |
|
| 122 | + ['sum', 'List -> Number', F\sum()], |
|
| 123 | + ['product', 'List -> Number', F\product()], |
|
| 124 | + ['min', 'Number -> Number -> Number', F\min()], |
|
| 125 | + ['minBy', 'Function -> Any -> Any -> Any', F\minBy()], |
|
| 126 | + ['max', 'Number -> Number -> Number', F\max()], |
|
| 127 | + ['maxBy', 'Function -> Any -> Any -> Any', F\maxBy()], |
|
| 128 | 128 | |
| 129 | 129 | ]); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * @ignore |
| 81 | 81 | * @signature (a -> b) -> (a -> b) |
| 82 | 82 | * @param callable $fn |
| 83 | - * @return callable |
|
| 83 | + * @return \Closure |
|
| 84 | 84 | */ |
| 85 | 85 | function _curry_one($fn) { |
| 86 | 86 | return function() use($fn) { |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @ignore |
| 98 | 98 | * @signature (a,b -> c) -> (a -> b -> c) |
| 99 | 99 | * @param callable $fn |
| 100 | - * @return callable |
|
| 100 | + * @return \Closure |
|
| 101 | 101 | */ |
| 102 | 102 | function _curry_two($fn) { |
| 103 | 103 | return function() use($fn) { |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * @ignore |
| 136 | 136 | * @signature (a,b,c -> d) -> (a -> b -> c -> d) |
| 137 | 137 | * @param callable $fn |
| 138 | - * @return callable |
|
| 138 | + * @return \Closure |
|
| 139 | 139 | */ |
| 140 | 140 | function _curry_three($fn) { |
| 141 | 141 | return function() use($fn) { |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * @param callable $fn |
| 191 | 191 | * @param int $n |
| 192 | 192 | * @param array $given |
| 193 | - * @return callable |
|
| 193 | + * @return \Closure |
|
| 194 | 194 | */ |
| 195 | 195 | function _curry_n($fn, $n, $given = []) { |
| 196 | 196 | return function() use($fn, $n, $given) { |