line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# This file was autogenerated. |
2
|
2
|
|
|
2
|
|
234116
|
use 5.008001; |
|
2
|
|
|
|
|
14
|
|
3
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
42
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
53
|
|
5
|
2
|
|
|
2
|
|
9
|
no warnings qw( void once ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
56
|
|
6
|
2
|
|
|
2
|
|
395
|
use Hydrogen (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
34
|
|
7
|
2
|
|
|
2
|
|
575
|
use Hydrogen::ArrayRef (); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
218
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package Hydrogen::Curry::ArrayRef; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
12
|
|
|
|
|
|
|
our $VERSION = '0.020000'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 NAME |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Hydrogen::Curry::ArrayRef - easily curry functions from Hydrogen::ArrayRef |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 VERSION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
This documentation is for Hydrogen::Curry::ArrayRef 0.020000, |
21
|
|
|
|
|
|
|
which is based on Sub::HandlesVia::HandlerLibrary::Array 0.046. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=cut |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 FUNCTIONS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Each function expects a reference to an array as its only argument and returns a coderef. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
2
|
|
|
|
|
11
|
use Exporter::Shiny qw( |
32
|
|
|
|
|
|
|
curry_accessor |
33
|
|
|
|
|
|
|
curry_all |
34
|
|
|
|
|
|
|
curry_all_true |
35
|
|
|
|
|
|
|
curry_any |
36
|
|
|
|
|
|
|
curry_apply |
37
|
|
|
|
|
|
|
curry_clear |
38
|
|
|
|
|
|
|
curry_count |
39
|
|
|
|
|
|
|
curry_delete |
40
|
|
|
|
|
|
|
curry_elements |
41
|
|
|
|
|
|
|
curry_first |
42
|
|
|
|
|
|
|
curry_first_index |
43
|
|
|
|
|
|
|
curry_flatten |
44
|
|
|
|
|
|
|
curry_flatten_deep |
45
|
|
|
|
|
|
|
curry_for_each |
46
|
|
|
|
|
|
|
curry_for_each_pair |
47
|
|
|
|
|
|
|
curry_get |
48
|
|
|
|
|
|
|
curry_grep |
49
|
|
|
|
|
|
|
curry_head |
50
|
|
|
|
|
|
|
curry_insert |
51
|
|
|
|
|
|
|
curry_is_empty |
52
|
|
|
|
|
|
|
curry_join |
53
|
|
|
|
|
|
|
curry_map |
54
|
|
|
|
|
|
|
curry_max |
55
|
|
|
|
|
|
|
curry_maxstr |
56
|
|
|
|
|
|
|
curry_min |
57
|
|
|
|
|
|
|
curry_minstr |
58
|
|
|
|
|
|
|
curry_natatime |
59
|
|
|
|
|
|
|
curry_not_all_true |
60
|
|
|
|
|
|
|
curry_pairfirst |
61
|
|
|
|
|
|
|
curry_pairgrep |
62
|
|
|
|
|
|
|
curry_pairkeys |
63
|
|
|
|
|
|
|
curry_pairmap |
64
|
|
|
|
|
|
|
curry_pairs |
65
|
|
|
|
|
|
|
curry_pairvalues |
66
|
|
|
|
|
|
|
curry_pick_random |
67
|
|
|
|
|
|
|
curry_pop |
68
|
|
|
|
|
|
|
curry_print |
69
|
|
|
|
|
|
|
curry_product |
70
|
|
|
|
|
|
|
curry_push |
71
|
|
|
|
|
|
|
curry_reduce |
72
|
|
|
|
|
|
|
curry_reductions |
73
|
|
|
|
|
|
|
curry_reset |
74
|
|
|
|
|
|
|
curry_reverse |
75
|
|
|
|
|
|
|
curry_sample |
76
|
|
|
|
|
|
|
curry_set |
77
|
|
|
|
|
|
|
curry_shallow_clone |
78
|
|
|
|
|
|
|
curry_shift |
79
|
|
|
|
|
|
|
curry_shuffle |
80
|
|
|
|
|
|
|
curry_shuffle_in_place |
81
|
|
|
|
|
|
|
curry_sort |
82
|
|
|
|
|
|
|
curry_sort_in_place |
83
|
|
|
|
|
|
|
curry_splice |
84
|
|
|
|
|
|
|
curry_sum |
85
|
|
|
|
|
|
|
curry_tail |
86
|
|
|
|
|
|
|
curry_uniq |
87
|
|
|
|
|
|
|
curry_uniq_in_place |
88
|
|
|
|
|
|
|
curry_uniqnum |
89
|
|
|
|
|
|
|
curry_uniqnum_in_place |
90
|
|
|
|
|
|
|
curry_uniqstr |
91
|
|
|
|
|
|
|
curry_uniqstr_in_place |
92
|
|
|
|
|
|
|
curry_unshift |
93
|
2
|
|
|
2
|
|
14
|
); |
|
2
|
|
|
|
|
4
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
=head2 C<< curry_accessor( $arrayref ) >> |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::accessor >>. |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=cut |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
sub curry_accessor { |
102
|
1
|
50
|
|
1
|
1
|
7594
|
@_ == 1 |
103
|
|
|
|
|
|
|
or Hydrogen::croak( |
104
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_accessor: got %d, %s", |
105
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
106
|
|
|
|
|
|
|
); |
107
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
108
|
|
|
|
|
|
|
or Hydrogen::croak( |
109
|
|
|
|
|
|
|
"Type check failed in signature for curry_accessor: %s should be %s", |
110
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
111
|
|
|
|
|
|
|
); |
112
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
113
|
1
|
|
|
0
|
|
9
|
return sub { Hydrogen::ArrayRef::accessor( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
114
|
|
|
|
|
|
|
} |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=head2 C<< curry_all( $arrayref ) >> |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::all >>. |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
sub curry_all { |
123
|
1
|
50
|
|
1
|
1
|
3844
|
@_ == 1 |
124
|
|
|
|
|
|
|
or Hydrogen::croak( |
125
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_all: got %d, %s", |
126
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
127
|
|
|
|
|
|
|
); |
128
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
129
|
|
|
|
|
|
|
or Hydrogen::croak( |
130
|
|
|
|
|
|
|
"Type check failed in signature for curry_all: %s should be %s", |
131
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
132
|
|
|
|
|
|
|
); |
133
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
134
|
1
|
|
|
0
|
|
14
|
return sub { Hydrogen::ArrayRef::all( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
=head2 C<< curry_all_true( $arrayref ) >> |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::all_true >>. |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=cut |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
sub curry_all_true { |
144
|
1
|
50
|
|
1
|
1
|
2754
|
@_ == 1 |
145
|
|
|
|
|
|
|
or Hydrogen::croak( |
146
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_all_true: got %d, %s", |
147
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
148
|
|
|
|
|
|
|
); |
149
|
1
|
50
|
|
|
|
10
|
(ref($_[0]) eq 'ARRAY') |
150
|
|
|
|
|
|
|
or Hydrogen::croak( |
151
|
|
|
|
|
|
|
"Type check failed in signature for curry_all_true: %s should be %s", |
152
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
153
|
|
|
|
|
|
|
); |
154
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
155
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::all_true( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
156
|
|
|
|
|
|
|
} |
157
|
|
|
|
|
|
|
|
158
|
|
|
|
|
|
|
=head2 C<< curry_any( $arrayref ) >> |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::any >>. |
161
|
|
|
|
|
|
|
|
162
|
|
|
|
|
|
|
=cut |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
sub curry_any { |
165
|
1
|
50
|
|
1
|
1
|
2830
|
@_ == 1 |
166
|
|
|
|
|
|
|
or Hydrogen::croak( |
167
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_any: got %d, %s", |
168
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
169
|
|
|
|
|
|
|
); |
170
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
171
|
|
|
|
|
|
|
or Hydrogen::croak( |
172
|
|
|
|
|
|
|
"Type check failed in signature for curry_any: %s should be %s", |
173
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
174
|
|
|
|
|
|
|
); |
175
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
176
|
1
|
|
|
0
|
|
7
|
return sub { Hydrogen::ArrayRef::any( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
=head2 C<< curry_apply( $arrayref ) >> |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::apply >>. |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=cut |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
sub curry_apply { |
186
|
1
|
50
|
|
1
|
1
|
3199
|
@_ == 1 |
187
|
|
|
|
|
|
|
or Hydrogen::croak( |
188
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_apply: got %d, %s", |
189
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
190
|
|
|
|
|
|
|
); |
191
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
192
|
|
|
|
|
|
|
or Hydrogen::croak( |
193
|
|
|
|
|
|
|
"Type check failed in signature for curry_apply: %s should be %s", |
194
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
195
|
|
|
|
|
|
|
); |
196
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
197
|
1
|
|
|
0
|
|
4
|
return sub { Hydrogen::ArrayRef::apply( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=head2 C<< curry_clear( $arrayref ) >> |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::clear >>. |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=cut |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
sub curry_clear { |
207
|
1
|
50
|
|
1
|
1
|
2889
|
@_ == 1 |
208
|
|
|
|
|
|
|
or Hydrogen::croak( |
209
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_clear: got %d, %s", |
210
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
211
|
|
|
|
|
|
|
); |
212
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
213
|
|
|
|
|
|
|
or Hydrogen::croak( |
214
|
|
|
|
|
|
|
"Type check failed in signature for curry_clear: %s should be %s", |
215
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
216
|
|
|
|
|
|
|
); |
217
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
218
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::clear( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
219
|
|
|
|
|
|
|
} |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=head2 C<< curry_count( $arrayref ) >> |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::count >>. |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
=cut |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
sub curry_count { |
228
|
1
|
50
|
|
1
|
1
|
2749
|
@_ == 1 |
229
|
|
|
|
|
|
|
or Hydrogen::croak( |
230
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_count: got %d, %s", |
231
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
232
|
|
|
|
|
|
|
); |
233
|
1
|
50
|
|
|
|
19
|
(ref($_[0]) eq 'ARRAY') |
234
|
|
|
|
|
|
|
or Hydrogen::croak( |
235
|
|
|
|
|
|
|
"Type check failed in signature for curry_count: %s should be %s", |
236
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
237
|
|
|
|
|
|
|
); |
238
|
1
|
|
|
|
|
5
|
my $ref = \$_[0]; |
239
|
1
|
|
|
0
|
|
7
|
return sub { Hydrogen::ArrayRef::count( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
240
|
|
|
|
|
|
|
} |
241
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
=head2 C<< curry_delete( $arrayref ) >> |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::delete >>. |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
=cut |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
sub curry_delete { |
249
|
1
|
50
|
|
1
|
1
|
2776
|
@_ == 1 |
250
|
|
|
|
|
|
|
or Hydrogen::croak( |
251
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_delete: got %d, %s", |
252
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
253
|
|
|
|
|
|
|
); |
254
|
1
|
50
|
|
|
|
4
|
(ref($_[0]) eq 'ARRAY') |
255
|
|
|
|
|
|
|
or Hydrogen::croak( |
256
|
|
|
|
|
|
|
"Type check failed in signature for curry_delete: %s should be %s", |
257
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
258
|
|
|
|
|
|
|
); |
259
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
260
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::delete( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
261
|
|
|
|
|
|
|
} |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
=head2 C<< curry_elements( $arrayref ) >> |
264
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::elements >>. |
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
=cut |
268
|
|
|
|
|
|
|
|
269
|
|
|
|
|
|
|
sub curry_elements { |
270
|
1
|
50
|
|
1
|
1
|
2808
|
@_ == 1 |
271
|
|
|
|
|
|
|
or Hydrogen::croak( |
272
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_elements: got %d, %s", |
273
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
274
|
|
|
|
|
|
|
); |
275
|
1
|
50
|
|
|
|
15
|
(ref($_[0]) eq 'ARRAY') |
276
|
|
|
|
|
|
|
or Hydrogen::croak( |
277
|
|
|
|
|
|
|
"Type check failed in signature for curry_elements: %s should be %s", |
278
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
279
|
|
|
|
|
|
|
); |
280
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
281
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::elements( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
282
|
|
|
|
|
|
|
} |
283
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
=head2 C<< curry_first( $arrayref ) >> |
285
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::first >>. |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
=cut |
289
|
|
|
|
|
|
|
|
290
|
|
|
|
|
|
|
sub curry_first { |
291
|
1
|
50
|
|
1
|
1
|
2750
|
@_ == 1 |
292
|
|
|
|
|
|
|
or Hydrogen::croak( |
293
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_first: got %d, %s", |
294
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
295
|
|
|
|
|
|
|
); |
296
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
297
|
|
|
|
|
|
|
or Hydrogen::croak( |
298
|
|
|
|
|
|
|
"Type check failed in signature for curry_first: %s should be %s", |
299
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
300
|
|
|
|
|
|
|
); |
301
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
302
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::first( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
303
|
|
|
|
|
|
|
} |
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
=head2 C<< curry_first_index( $arrayref ) >> |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::first_index >>. |
308
|
|
|
|
|
|
|
|
309
|
|
|
|
|
|
|
=cut |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
sub curry_first_index { |
312
|
1
|
50
|
|
1
|
1
|
2838
|
@_ == 1 |
313
|
|
|
|
|
|
|
or Hydrogen::croak( |
314
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_first_index: got %d, %s", |
315
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
316
|
|
|
|
|
|
|
); |
317
|
1
|
50
|
|
|
|
12
|
(ref($_[0]) eq 'ARRAY') |
318
|
|
|
|
|
|
|
or Hydrogen::croak( |
319
|
|
|
|
|
|
|
"Type check failed in signature for curry_first_index: %s should be %s", |
320
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
321
|
|
|
|
|
|
|
); |
322
|
1
|
|
|
|
|
6
|
my $ref = \$_[0]; |
323
|
1
|
|
|
0
|
|
11
|
return sub { Hydrogen::ArrayRef::first_index( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
324
|
|
|
|
|
|
|
} |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
=head2 C<< curry_flatten( $arrayref ) >> |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::flatten >>. |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=cut |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
sub curry_flatten { |
333
|
1
|
50
|
|
1
|
1
|
2789
|
@_ == 1 |
334
|
|
|
|
|
|
|
or Hydrogen::croak( |
335
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_flatten: got %d, %s", |
336
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
337
|
|
|
|
|
|
|
); |
338
|
1
|
50
|
|
|
|
9
|
(ref($_[0]) eq 'ARRAY') |
339
|
|
|
|
|
|
|
or Hydrogen::croak( |
340
|
|
|
|
|
|
|
"Type check failed in signature for curry_flatten: %s should be %s", |
341
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
342
|
|
|
|
|
|
|
); |
343
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
344
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::flatten( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
345
|
|
|
|
|
|
|
} |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
=head2 C<< curry_flatten_deep( $arrayref ) >> |
348
|
|
|
|
|
|
|
|
349
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::flatten_deep >>. |
350
|
|
|
|
|
|
|
|
351
|
|
|
|
|
|
|
=cut |
352
|
|
|
|
|
|
|
|
353
|
|
|
|
|
|
|
sub curry_flatten_deep { |
354
|
1
|
50
|
|
1
|
1
|
2805
|
@_ == 1 |
355
|
|
|
|
|
|
|
or Hydrogen::croak( |
356
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_flatten_deep: got %d, %s", |
357
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
358
|
|
|
|
|
|
|
); |
359
|
1
|
50
|
|
|
|
7
|
(ref($_[0]) eq 'ARRAY') |
360
|
|
|
|
|
|
|
or Hydrogen::croak( |
361
|
|
|
|
|
|
|
"Type check failed in signature for curry_flatten_deep: %s should be %s", |
362
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
363
|
|
|
|
|
|
|
); |
364
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
365
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::flatten_deep( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
366
|
|
|
|
|
|
|
} |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
=head2 C<< curry_for_each( $arrayref ) >> |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::for_each >>. |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
=cut |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
sub curry_for_each { |
375
|
1
|
50
|
|
1
|
1
|
2746
|
@_ == 1 |
376
|
|
|
|
|
|
|
or Hydrogen::croak( |
377
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_for_each: got %d, %s", |
378
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
379
|
|
|
|
|
|
|
); |
380
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
381
|
|
|
|
|
|
|
or Hydrogen::croak( |
382
|
|
|
|
|
|
|
"Type check failed in signature for curry_for_each: %s should be %s", |
383
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
384
|
|
|
|
|
|
|
); |
385
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
386
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::for_each( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
387
|
|
|
|
|
|
|
} |
388
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
=head2 C<< curry_for_each_pair( $arrayref ) >> |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::for_each_pair >>. |
392
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
=cut |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
sub curry_for_each_pair { |
396
|
1
|
50
|
|
1
|
1
|
2791
|
@_ == 1 |
397
|
|
|
|
|
|
|
or Hydrogen::croak( |
398
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_for_each_pair: got %d, %s", |
399
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
400
|
|
|
|
|
|
|
); |
401
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
402
|
|
|
|
|
|
|
or Hydrogen::croak( |
403
|
|
|
|
|
|
|
"Type check failed in signature for curry_for_each_pair: %s should be %s", |
404
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
405
|
|
|
|
|
|
|
); |
406
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
407
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::for_each_pair( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
408
|
|
|
|
|
|
|
} |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
=head2 C<< curry_get( $arrayref ) >> |
411
|
|
|
|
|
|
|
|
412
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::get >>. |
413
|
|
|
|
|
|
|
|
414
|
|
|
|
|
|
|
=cut |
415
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
sub curry_get { |
417
|
1
|
50
|
|
1
|
1
|
2814
|
@_ == 1 |
418
|
|
|
|
|
|
|
or Hydrogen::croak( |
419
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_get: got %d, %s", |
420
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
421
|
|
|
|
|
|
|
); |
422
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
423
|
|
|
|
|
|
|
or Hydrogen::croak( |
424
|
|
|
|
|
|
|
"Type check failed in signature for curry_get: %s should be %s", |
425
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
426
|
|
|
|
|
|
|
); |
427
|
1
|
|
|
|
|
6
|
my $ref = \$_[0]; |
428
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::get( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
429
|
|
|
|
|
|
|
} |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
=head2 C<< curry_grep( $arrayref ) >> |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::grep >>. |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
=cut |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
sub curry_grep { |
438
|
1
|
50
|
|
1
|
1
|
2771
|
@_ == 1 |
439
|
|
|
|
|
|
|
or Hydrogen::croak( |
440
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_grep: got %d, %s", |
441
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
442
|
|
|
|
|
|
|
); |
443
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
444
|
|
|
|
|
|
|
or Hydrogen::croak( |
445
|
|
|
|
|
|
|
"Type check failed in signature for curry_grep: %s should be %s", |
446
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
447
|
|
|
|
|
|
|
); |
448
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
449
|
1
|
|
|
0
|
|
7
|
return sub { Hydrogen::ArrayRef::grep( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
450
|
|
|
|
|
|
|
} |
451
|
|
|
|
|
|
|
|
452
|
|
|
|
|
|
|
=head2 C<< curry_head( $arrayref ) >> |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::head >>. |
455
|
|
|
|
|
|
|
|
456
|
|
|
|
|
|
|
=cut |
457
|
|
|
|
|
|
|
|
458
|
|
|
|
|
|
|
sub curry_head { |
459
|
1
|
50
|
|
1
|
1
|
2800
|
@_ == 1 |
460
|
|
|
|
|
|
|
or Hydrogen::croak( |
461
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_head: got %d, %s", |
462
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
463
|
|
|
|
|
|
|
); |
464
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
465
|
|
|
|
|
|
|
or Hydrogen::croak( |
466
|
|
|
|
|
|
|
"Type check failed in signature for curry_head: %s should be %s", |
467
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
468
|
|
|
|
|
|
|
); |
469
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
470
|
1
|
|
|
0
|
|
4
|
return sub { Hydrogen::ArrayRef::head( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
471
|
|
|
|
|
|
|
} |
472
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
=head2 C<< curry_insert( $arrayref ) >> |
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::insert >>. |
476
|
|
|
|
|
|
|
|
477
|
|
|
|
|
|
|
=cut |
478
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
sub curry_insert { |
480
|
1
|
50
|
|
1
|
1
|
2848
|
@_ == 1 |
481
|
|
|
|
|
|
|
or Hydrogen::croak( |
482
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_insert: got %d, %s", |
483
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
484
|
|
|
|
|
|
|
); |
485
|
1
|
50
|
|
|
|
39
|
(ref($_[0]) eq 'ARRAY') |
486
|
|
|
|
|
|
|
or Hydrogen::croak( |
487
|
|
|
|
|
|
|
"Type check failed in signature for curry_insert: %s should be %s", |
488
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
489
|
|
|
|
|
|
|
); |
490
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
491
|
1
|
|
|
0
|
|
19
|
return sub { Hydrogen::ArrayRef::insert( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
492
|
|
|
|
|
|
|
} |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
=head2 C<< curry_is_empty( $arrayref ) >> |
495
|
|
|
|
|
|
|
|
496
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::is_empty >>. |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
=cut |
499
|
|
|
|
|
|
|
|
500
|
|
|
|
|
|
|
sub curry_is_empty { |
501
|
1
|
50
|
|
1
|
1
|
2835
|
@_ == 1 |
502
|
|
|
|
|
|
|
or Hydrogen::croak( |
503
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_is_empty: got %d, %s", |
504
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
505
|
|
|
|
|
|
|
); |
506
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
507
|
|
|
|
|
|
|
or Hydrogen::croak( |
508
|
|
|
|
|
|
|
"Type check failed in signature for curry_is_empty: %s should be %s", |
509
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
510
|
|
|
|
|
|
|
); |
511
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
512
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::is_empty( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
513
|
|
|
|
|
|
|
} |
514
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
=head2 C<< curry_join( $arrayref ) >> |
516
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::join >>. |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
=cut |
520
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
sub curry_join { |
522
|
1
|
50
|
|
1
|
1
|
2788
|
@_ == 1 |
523
|
|
|
|
|
|
|
or Hydrogen::croak( |
524
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_join: got %d, %s", |
525
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
526
|
|
|
|
|
|
|
); |
527
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
528
|
|
|
|
|
|
|
or Hydrogen::croak( |
529
|
|
|
|
|
|
|
"Type check failed in signature for curry_join: %s should be %s", |
530
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
531
|
|
|
|
|
|
|
); |
532
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
533
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::join( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
534
|
|
|
|
|
|
|
} |
535
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
=head2 C<< curry_map( $arrayref ) >> |
537
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::map >>. |
539
|
|
|
|
|
|
|
|
540
|
|
|
|
|
|
|
=cut |
541
|
|
|
|
|
|
|
|
542
|
|
|
|
|
|
|
sub curry_map { |
543
|
1
|
50
|
|
1
|
1
|
2805
|
@_ == 1 |
544
|
|
|
|
|
|
|
or Hydrogen::croak( |
545
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_map: got %d, %s", |
546
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
547
|
|
|
|
|
|
|
); |
548
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
549
|
|
|
|
|
|
|
or Hydrogen::croak( |
550
|
|
|
|
|
|
|
"Type check failed in signature for curry_map: %s should be %s", |
551
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
552
|
|
|
|
|
|
|
); |
553
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
554
|
1
|
|
|
0
|
|
4
|
return sub { Hydrogen::ArrayRef::map( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
555
|
|
|
|
|
|
|
} |
556
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
=head2 C<< curry_max( $arrayref ) >> |
558
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::max >>. |
560
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
=cut |
562
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
sub curry_max { |
564
|
1
|
50
|
|
1
|
1
|
2811
|
@_ == 1 |
565
|
|
|
|
|
|
|
or Hydrogen::croak( |
566
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_max: got %d, %s", |
567
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
568
|
|
|
|
|
|
|
); |
569
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
570
|
|
|
|
|
|
|
or Hydrogen::croak( |
571
|
|
|
|
|
|
|
"Type check failed in signature for curry_max: %s should be %s", |
572
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
573
|
|
|
|
|
|
|
); |
574
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
575
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::max( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
576
|
|
|
|
|
|
|
} |
577
|
|
|
|
|
|
|
|
578
|
|
|
|
|
|
|
=head2 C<< curry_maxstr( $arrayref ) >> |
579
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::maxstr >>. |
581
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
=cut |
583
|
|
|
|
|
|
|
|
584
|
|
|
|
|
|
|
sub curry_maxstr { |
585
|
1
|
50
|
|
1
|
1
|
2753
|
@_ == 1 |
586
|
|
|
|
|
|
|
or Hydrogen::croak( |
587
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_maxstr: got %d, %s", |
588
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
589
|
|
|
|
|
|
|
); |
590
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
591
|
|
|
|
|
|
|
or Hydrogen::croak( |
592
|
|
|
|
|
|
|
"Type check failed in signature for curry_maxstr: %s should be %s", |
593
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
594
|
|
|
|
|
|
|
); |
595
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
596
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::maxstr( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
597
|
|
|
|
|
|
|
} |
598
|
|
|
|
|
|
|
|
599
|
|
|
|
|
|
|
=head2 C<< curry_min( $arrayref ) >> |
600
|
|
|
|
|
|
|
|
601
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::min >>. |
602
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
=cut |
604
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
sub curry_min { |
606
|
1
|
50
|
|
1
|
1
|
2781
|
@_ == 1 |
607
|
|
|
|
|
|
|
or Hydrogen::croak( |
608
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_min: got %d, %s", |
609
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
610
|
|
|
|
|
|
|
); |
611
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
612
|
|
|
|
|
|
|
or Hydrogen::croak( |
613
|
|
|
|
|
|
|
"Type check failed in signature for curry_min: %s should be %s", |
614
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
615
|
|
|
|
|
|
|
); |
616
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
617
|
1
|
|
|
0
|
|
7
|
return sub { Hydrogen::ArrayRef::min( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
618
|
|
|
|
|
|
|
} |
619
|
|
|
|
|
|
|
|
620
|
|
|
|
|
|
|
=head2 C<< curry_minstr( $arrayref ) >> |
621
|
|
|
|
|
|
|
|
622
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::minstr >>. |
623
|
|
|
|
|
|
|
|
624
|
|
|
|
|
|
|
=cut |
625
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
sub curry_minstr { |
627
|
1
|
50
|
|
1
|
1
|
2807
|
@_ == 1 |
628
|
|
|
|
|
|
|
or Hydrogen::croak( |
629
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_minstr: got %d, %s", |
630
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
631
|
|
|
|
|
|
|
); |
632
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
633
|
|
|
|
|
|
|
or Hydrogen::croak( |
634
|
|
|
|
|
|
|
"Type check failed in signature for curry_minstr: %s should be %s", |
635
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
636
|
|
|
|
|
|
|
); |
637
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
638
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::minstr( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
639
|
|
|
|
|
|
|
} |
640
|
|
|
|
|
|
|
|
641
|
|
|
|
|
|
|
=head2 C<< curry_natatime( $arrayref ) >> |
642
|
|
|
|
|
|
|
|
643
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::natatime >>. |
644
|
|
|
|
|
|
|
|
645
|
|
|
|
|
|
|
=cut |
646
|
|
|
|
|
|
|
|
647
|
|
|
|
|
|
|
sub curry_natatime { |
648
|
1
|
50
|
|
1
|
1
|
2765
|
@_ == 1 |
649
|
|
|
|
|
|
|
or Hydrogen::croak( |
650
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_natatime: got %d, %s", |
651
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
652
|
|
|
|
|
|
|
); |
653
|
1
|
50
|
|
|
|
13
|
(ref($_[0]) eq 'ARRAY') |
654
|
|
|
|
|
|
|
or Hydrogen::croak( |
655
|
|
|
|
|
|
|
"Type check failed in signature for curry_natatime: %s should be %s", |
656
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
657
|
|
|
|
|
|
|
); |
658
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
659
|
1
|
|
|
0
|
|
4
|
return sub { Hydrogen::ArrayRef::natatime( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
660
|
|
|
|
|
|
|
} |
661
|
|
|
|
|
|
|
|
662
|
|
|
|
|
|
|
=head2 C<< curry_not_all_true( $arrayref ) >> |
663
|
|
|
|
|
|
|
|
664
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::not_all_true >>. |
665
|
|
|
|
|
|
|
|
666
|
|
|
|
|
|
|
=cut |
667
|
|
|
|
|
|
|
|
668
|
|
|
|
|
|
|
sub curry_not_all_true { |
669
|
1
|
50
|
|
1
|
1
|
2794
|
@_ == 1 |
670
|
|
|
|
|
|
|
or Hydrogen::croak( |
671
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_not_all_true: got %d, %s", |
672
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
673
|
|
|
|
|
|
|
); |
674
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
675
|
|
|
|
|
|
|
or Hydrogen::croak( |
676
|
|
|
|
|
|
|
"Type check failed in signature for curry_not_all_true: %s should be %s", |
677
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
678
|
|
|
|
|
|
|
); |
679
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
680
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::not_all_true( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
681
|
|
|
|
|
|
|
} |
682
|
|
|
|
|
|
|
|
683
|
|
|
|
|
|
|
=head2 C<< curry_pairfirst( $arrayref ) >> |
684
|
|
|
|
|
|
|
|
685
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pairfirst >>. |
686
|
|
|
|
|
|
|
|
687
|
|
|
|
|
|
|
=cut |
688
|
|
|
|
|
|
|
|
689
|
|
|
|
|
|
|
sub curry_pairfirst { |
690
|
1
|
50
|
|
1
|
1
|
2781
|
@_ == 1 |
691
|
|
|
|
|
|
|
or Hydrogen::croak( |
692
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pairfirst: got %d, %s", |
693
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
694
|
|
|
|
|
|
|
); |
695
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
696
|
|
|
|
|
|
|
or Hydrogen::croak( |
697
|
|
|
|
|
|
|
"Type check failed in signature for curry_pairfirst: %s should be %s", |
698
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
699
|
|
|
|
|
|
|
); |
700
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
701
|
1
|
|
|
0
|
|
4
|
return sub { Hydrogen::ArrayRef::pairfirst( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
702
|
|
|
|
|
|
|
} |
703
|
|
|
|
|
|
|
|
704
|
|
|
|
|
|
|
=head2 C<< curry_pairgrep( $arrayref ) >> |
705
|
|
|
|
|
|
|
|
706
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pairgrep >>. |
707
|
|
|
|
|
|
|
|
708
|
|
|
|
|
|
|
=cut |
709
|
|
|
|
|
|
|
|
710
|
|
|
|
|
|
|
sub curry_pairgrep { |
711
|
1
|
50
|
|
1
|
1
|
2810
|
@_ == 1 |
712
|
|
|
|
|
|
|
or Hydrogen::croak( |
713
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pairgrep: got %d, %s", |
714
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
715
|
|
|
|
|
|
|
); |
716
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
717
|
|
|
|
|
|
|
or Hydrogen::croak( |
718
|
|
|
|
|
|
|
"Type check failed in signature for curry_pairgrep: %s should be %s", |
719
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
720
|
|
|
|
|
|
|
); |
721
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
722
|
1
|
|
|
0
|
|
4
|
return sub { Hydrogen::ArrayRef::pairgrep( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
723
|
|
|
|
|
|
|
} |
724
|
|
|
|
|
|
|
|
725
|
|
|
|
|
|
|
=head2 C<< curry_pairkeys( $arrayref ) >> |
726
|
|
|
|
|
|
|
|
727
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pairkeys >>. |
728
|
|
|
|
|
|
|
|
729
|
|
|
|
|
|
|
=cut |
730
|
|
|
|
|
|
|
|
731
|
|
|
|
|
|
|
sub curry_pairkeys { |
732
|
1
|
50
|
|
1
|
1
|
2772
|
@_ == 1 |
733
|
|
|
|
|
|
|
or Hydrogen::croak( |
734
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pairkeys: got %d, %s", |
735
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
736
|
|
|
|
|
|
|
); |
737
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
738
|
|
|
|
|
|
|
or Hydrogen::croak( |
739
|
|
|
|
|
|
|
"Type check failed in signature for curry_pairkeys: %s should be %s", |
740
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
741
|
|
|
|
|
|
|
); |
742
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
743
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::pairkeys( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
744
|
|
|
|
|
|
|
} |
745
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
=head2 C<< curry_pairmap( $arrayref ) >> |
747
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pairmap >>. |
749
|
|
|
|
|
|
|
|
750
|
|
|
|
|
|
|
=cut |
751
|
|
|
|
|
|
|
|
752
|
|
|
|
|
|
|
sub curry_pairmap { |
753
|
1
|
50
|
|
1
|
1
|
2796
|
@_ == 1 |
754
|
|
|
|
|
|
|
or Hydrogen::croak( |
755
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pairmap: got %d, %s", |
756
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
757
|
|
|
|
|
|
|
); |
758
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
759
|
|
|
|
|
|
|
or Hydrogen::croak( |
760
|
|
|
|
|
|
|
"Type check failed in signature for curry_pairmap: %s should be %s", |
761
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
762
|
|
|
|
|
|
|
); |
763
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
764
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::pairmap( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
765
|
|
|
|
|
|
|
} |
766
|
|
|
|
|
|
|
|
767
|
|
|
|
|
|
|
=head2 C<< curry_pairs( $arrayref ) >> |
768
|
|
|
|
|
|
|
|
769
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pairs >>. |
770
|
|
|
|
|
|
|
|
771
|
|
|
|
|
|
|
=cut |
772
|
|
|
|
|
|
|
|
773
|
|
|
|
|
|
|
sub curry_pairs { |
774
|
1
|
50
|
|
1
|
1
|
2818
|
@_ == 1 |
775
|
|
|
|
|
|
|
or Hydrogen::croak( |
776
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pairs: got %d, %s", |
777
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
778
|
|
|
|
|
|
|
); |
779
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
780
|
|
|
|
|
|
|
or Hydrogen::croak( |
781
|
|
|
|
|
|
|
"Type check failed in signature for curry_pairs: %s should be %s", |
782
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
783
|
|
|
|
|
|
|
); |
784
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
785
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::pairs( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
786
|
|
|
|
|
|
|
} |
787
|
|
|
|
|
|
|
|
788
|
|
|
|
|
|
|
=head2 C<< curry_pairvalues( $arrayref ) >> |
789
|
|
|
|
|
|
|
|
790
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pairvalues >>. |
791
|
|
|
|
|
|
|
|
792
|
|
|
|
|
|
|
=cut |
793
|
|
|
|
|
|
|
|
794
|
|
|
|
|
|
|
sub curry_pairvalues { |
795
|
1
|
50
|
|
1
|
1
|
2755
|
@_ == 1 |
796
|
|
|
|
|
|
|
or Hydrogen::croak( |
797
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pairvalues: got %d, %s", |
798
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
799
|
|
|
|
|
|
|
); |
800
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
801
|
|
|
|
|
|
|
or Hydrogen::croak( |
802
|
|
|
|
|
|
|
"Type check failed in signature for curry_pairvalues: %s should be %s", |
803
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
804
|
|
|
|
|
|
|
); |
805
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
806
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::pairvalues( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
807
|
|
|
|
|
|
|
} |
808
|
|
|
|
|
|
|
|
809
|
|
|
|
|
|
|
=head2 C<< curry_pick_random( $arrayref ) >> |
810
|
|
|
|
|
|
|
|
811
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pick_random >>. |
812
|
|
|
|
|
|
|
|
813
|
|
|
|
|
|
|
=cut |
814
|
|
|
|
|
|
|
|
815
|
|
|
|
|
|
|
sub curry_pick_random { |
816
|
1
|
50
|
|
1
|
1
|
2798
|
@_ == 1 |
817
|
|
|
|
|
|
|
or Hydrogen::croak( |
818
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pick_random: got %d, %s", |
819
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
820
|
|
|
|
|
|
|
); |
821
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
822
|
|
|
|
|
|
|
or Hydrogen::croak( |
823
|
|
|
|
|
|
|
"Type check failed in signature for curry_pick_random: %s should be %s", |
824
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
825
|
|
|
|
|
|
|
); |
826
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
827
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::pick_random( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
828
|
|
|
|
|
|
|
} |
829
|
|
|
|
|
|
|
|
830
|
|
|
|
|
|
|
=head2 C<< curry_pop( $arrayref ) >> |
831
|
|
|
|
|
|
|
|
832
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::pop >>. |
833
|
|
|
|
|
|
|
|
834
|
|
|
|
|
|
|
=cut |
835
|
|
|
|
|
|
|
|
836
|
|
|
|
|
|
|
sub curry_pop { |
837
|
1
|
50
|
|
1
|
1
|
2825
|
@_ == 1 |
838
|
|
|
|
|
|
|
or Hydrogen::croak( |
839
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_pop: got %d, %s", |
840
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
841
|
|
|
|
|
|
|
); |
842
|
1
|
50
|
|
|
|
7
|
(ref($_[0]) eq 'ARRAY') |
843
|
|
|
|
|
|
|
or Hydrogen::croak( |
844
|
|
|
|
|
|
|
"Type check failed in signature for curry_pop: %s should be %s", |
845
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
846
|
|
|
|
|
|
|
); |
847
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
848
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::pop( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
849
|
|
|
|
|
|
|
} |
850
|
|
|
|
|
|
|
|
851
|
|
|
|
|
|
|
=head2 C<< curry_print( $arrayref ) >> |
852
|
|
|
|
|
|
|
|
853
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::print >>. |
854
|
|
|
|
|
|
|
|
855
|
|
|
|
|
|
|
=cut |
856
|
|
|
|
|
|
|
|
857
|
|
|
|
|
|
|
sub curry_print { |
858
|
1
|
50
|
|
1
|
1
|
2761
|
@_ == 1 |
859
|
|
|
|
|
|
|
or Hydrogen::croak( |
860
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_print: got %d, %s", |
861
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
862
|
|
|
|
|
|
|
); |
863
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
864
|
|
|
|
|
|
|
or Hydrogen::croak( |
865
|
|
|
|
|
|
|
"Type check failed in signature for curry_print: %s should be %s", |
866
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
867
|
|
|
|
|
|
|
); |
868
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
869
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::print( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
870
|
|
|
|
|
|
|
} |
871
|
|
|
|
|
|
|
|
872
|
|
|
|
|
|
|
=head2 C<< curry_product( $arrayref ) >> |
873
|
|
|
|
|
|
|
|
874
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::product >>. |
875
|
|
|
|
|
|
|
|
876
|
|
|
|
|
|
|
=cut |
877
|
|
|
|
|
|
|
|
878
|
|
|
|
|
|
|
sub curry_product { |
879
|
1
|
50
|
|
1
|
1
|
2807
|
@_ == 1 |
880
|
|
|
|
|
|
|
or Hydrogen::croak( |
881
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_product: got %d, %s", |
882
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
883
|
|
|
|
|
|
|
); |
884
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
885
|
|
|
|
|
|
|
or Hydrogen::croak( |
886
|
|
|
|
|
|
|
"Type check failed in signature for curry_product: %s should be %s", |
887
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
888
|
|
|
|
|
|
|
); |
889
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
890
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::product( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
891
|
|
|
|
|
|
|
} |
892
|
|
|
|
|
|
|
|
893
|
|
|
|
|
|
|
=head2 C<< curry_push( $arrayref ) >> |
894
|
|
|
|
|
|
|
|
895
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::push >>. |
896
|
|
|
|
|
|
|
|
897
|
|
|
|
|
|
|
=cut |
898
|
|
|
|
|
|
|
|
899
|
|
|
|
|
|
|
sub curry_push { |
900
|
1
|
50
|
|
1
|
1
|
2787
|
@_ == 1 |
901
|
|
|
|
|
|
|
or Hydrogen::croak( |
902
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_push: got %d, %s", |
903
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
904
|
|
|
|
|
|
|
); |
905
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
906
|
|
|
|
|
|
|
or Hydrogen::croak( |
907
|
|
|
|
|
|
|
"Type check failed in signature for curry_push: %s should be %s", |
908
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
909
|
|
|
|
|
|
|
); |
910
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
911
|
1
|
|
|
0
|
|
7
|
return sub { Hydrogen::ArrayRef::push( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
912
|
|
|
|
|
|
|
} |
913
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
=head2 C<< curry_reduce( $arrayref ) >> |
915
|
|
|
|
|
|
|
|
916
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::reduce >>. |
917
|
|
|
|
|
|
|
|
918
|
|
|
|
|
|
|
=cut |
919
|
|
|
|
|
|
|
|
920
|
|
|
|
|
|
|
sub curry_reduce { |
921
|
1
|
50
|
|
1
|
1
|
2832
|
@_ == 1 |
922
|
|
|
|
|
|
|
or Hydrogen::croak( |
923
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_reduce: got %d, %s", |
924
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
925
|
|
|
|
|
|
|
); |
926
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
927
|
|
|
|
|
|
|
or Hydrogen::croak( |
928
|
|
|
|
|
|
|
"Type check failed in signature for curry_reduce: %s should be %s", |
929
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
930
|
|
|
|
|
|
|
); |
931
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
932
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::reduce( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
933
|
|
|
|
|
|
|
} |
934
|
|
|
|
|
|
|
|
935
|
|
|
|
|
|
|
=head2 C<< curry_reductions( $arrayref ) >> |
936
|
|
|
|
|
|
|
|
937
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::reductions >>. |
938
|
|
|
|
|
|
|
|
939
|
|
|
|
|
|
|
=cut |
940
|
|
|
|
|
|
|
|
941
|
|
|
|
|
|
|
sub curry_reductions { |
942
|
1
|
50
|
|
1
|
1
|
2767
|
@_ == 1 |
943
|
|
|
|
|
|
|
or Hydrogen::croak( |
944
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_reductions: got %d, %s", |
945
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
946
|
|
|
|
|
|
|
); |
947
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
948
|
|
|
|
|
|
|
or Hydrogen::croak( |
949
|
|
|
|
|
|
|
"Type check failed in signature for curry_reductions: %s should be %s", |
950
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
951
|
|
|
|
|
|
|
); |
952
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
953
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::reductions( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
954
|
|
|
|
|
|
|
} |
955
|
|
|
|
|
|
|
|
956
|
|
|
|
|
|
|
=head2 C<< curry_reset( $arrayref ) >> |
957
|
|
|
|
|
|
|
|
958
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::reset >>. |
959
|
|
|
|
|
|
|
|
960
|
|
|
|
|
|
|
=cut |
961
|
|
|
|
|
|
|
|
962
|
|
|
|
|
|
|
sub curry_reset { |
963
|
1
|
50
|
|
1
|
1
|
2795
|
@_ == 1 |
964
|
|
|
|
|
|
|
or Hydrogen::croak( |
965
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_reset: got %d, %s", |
966
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
967
|
|
|
|
|
|
|
); |
968
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
969
|
|
|
|
|
|
|
or Hydrogen::croak( |
970
|
|
|
|
|
|
|
"Type check failed in signature for curry_reset: %s should be %s", |
971
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
972
|
|
|
|
|
|
|
); |
973
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
974
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::reset( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
975
|
|
|
|
|
|
|
} |
976
|
|
|
|
|
|
|
|
977
|
|
|
|
|
|
|
=head2 C<< curry_reverse( $arrayref ) >> |
978
|
|
|
|
|
|
|
|
979
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::reverse >>. |
980
|
|
|
|
|
|
|
|
981
|
|
|
|
|
|
|
=cut |
982
|
|
|
|
|
|
|
|
983
|
|
|
|
|
|
|
sub curry_reverse { |
984
|
1
|
50
|
|
1
|
1
|
2799
|
@_ == 1 |
985
|
|
|
|
|
|
|
or Hydrogen::croak( |
986
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_reverse: got %d, %s", |
987
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
988
|
|
|
|
|
|
|
); |
989
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
990
|
|
|
|
|
|
|
or Hydrogen::croak( |
991
|
|
|
|
|
|
|
"Type check failed in signature for curry_reverse: %s should be %s", |
992
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
993
|
|
|
|
|
|
|
); |
994
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
995
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::reverse( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
996
|
|
|
|
|
|
|
} |
997
|
|
|
|
|
|
|
|
998
|
|
|
|
|
|
|
=head2 C<< curry_sample( $arrayref ) >> |
999
|
|
|
|
|
|
|
|
1000
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::sample >>. |
1001
|
|
|
|
|
|
|
|
1002
|
|
|
|
|
|
|
=cut |
1003
|
|
|
|
|
|
|
|
1004
|
|
|
|
|
|
|
sub curry_sample { |
1005
|
1
|
50
|
|
1
|
1
|
2796
|
@_ == 1 |
1006
|
|
|
|
|
|
|
or Hydrogen::croak( |
1007
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_sample: got %d, %s", |
1008
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1009
|
|
|
|
|
|
|
); |
1010
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
1011
|
|
|
|
|
|
|
or Hydrogen::croak( |
1012
|
|
|
|
|
|
|
"Type check failed in signature for curry_sample: %s should be %s", |
1013
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1014
|
|
|
|
|
|
|
); |
1015
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1016
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::sample( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1017
|
|
|
|
|
|
|
} |
1018
|
|
|
|
|
|
|
|
1019
|
|
|
|
|
|
|
=head2 C<< curry_set( $arrayref ) >> |
1020
|
|
|
|
|
|
|
|
1021
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::set >>. |
1022
|
|
|
|
|
|
|
|
1023
|
|
|
|
|
|
|
=cut |
1024
|
|
|
|
|
|
|
|
1025
|
|
|
|
|
|
|
sub curry_set { |
1026
|
1
|
50
|
|
1
|
1
|
2780
|
@_ == 1 |
1027
|
|
|
|
|
|
|
or Hydrogen::croak( |
1028
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_set: got %d, %s", |
1029
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1030
|
|
|
|
|
|
|
); |
1031
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
1032
|
|
|
|
|
|
|
or Hydrogen::croak( |
1033
|
|
|
|
|
|
|
"Type check failed in signature for curry_set: %s should be %s", |
1034
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1035
|
|
|
|
|
|
|
); |
1036
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1037
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::set( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1038
|
|
|
|
|
|
|
} |
1039
|
|
|
|
|
|
|
|
1040
|
|
|
|
|
|
|
=head2 C<< curry_shallow_clone( $arrayref ) >> |
1041
|
|
|
|
|
|
|
|
1042
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::shallow_clone >>. |
1043
|
|
|
|
|
|
|
|
1044
|
|
|
|
|
|
|
=cut |
1045
|
|
|
|
|
|
|
|
1046
|
|
|
|
|
|
|
sub curry_shallow_clone { |
1047
|
1
|
50
|
|
1
|
1
|
2809
|
@_ == 1 |
1048
|
|
|
|
|
|
|
or Hydrogen::croak( |
1049
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_shallow_clone: got %d, %s", |
1050
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1051
|
|
|
|
|
|
|
); |
1052
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
1053
|
|
|
|
|
|
|
or Hydrogen::croak( |
1054
|
|
|
|
|
|
|
"Type check failed in signature for curry_shallow_clone: %s should be %s", |
1055
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1056
|
|
|
|
|
|
|
); |
1057
|
1
|
|
|
|
|
2
|
my $ref = \$_[0]; |
1058
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::shallow_clone( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1059
|
|
|
|
|
|
|
} |
1060
|
|
|
|
|
|
|
|
1061
|
|
|
|
|
|
|
=head2 C<< curry_shift( $arrayref ) >> |
1062
|
|
|
|
|
|
|
|
1063
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::shift >>. |
1064
|
|
|
|
|
|
|
|
1065
|
|
|
|
|
|
|
=cut |
1066
|
|
|
|
|
|
|
|
1067
|
|
|
|
|
|
|
sub curry_shift { |
1068
|
1
|
50
|
|
1
|
1
|
2827
|
@_ == 1 |
1069
|
|
|
|
|
|
|
or Hydrogen::croak( |
1070
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_shift: got %d, %s", |
1071
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1072
|
|
|
|
|
|
|
); |
1073
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
1074
|
|
|
|
|
|
|
or Hydrogen::croak( |
1075
|
|
|
|
|
|
|
"Type check failed in signature for curry_shift: %s should be %s", |
1076
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1077
|
|
|
|
|
|
|
); |
1078
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
1079
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::shift( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1080
|
|
|
|
|
|
|
} |
1081
|
|
|
|
|
|
|
|
1082
|
|
|
|
|
|
|
=head2 C<< curry_shuffle( $arrayref ) >> |
1083
|
|
|
|
|
|
|
|
1084
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::shuffle >>. |
1085
|
|
|
|
|
|
|
|
1086
|
|
|
|
|
|
|
=cut |
1087
|
|
|
|
|
|
|
|
1088
|
|
|
|
|
|
|
sub curry_shuffle { |
1089
|
1
|
50
|
|
1
|
1
|
2866
|
@_ == 1 |
1090
|
|
|
|
|
|
|
or Hydrogen::croak( |
1091
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_shuffle: got %d, %s", |
1092
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1093
|
|
|
|
|
|
|
); |
1094
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
1095
|
|
|
|
|
|
|
or Hydrogen::croak( |
1096
|
|
|
|
|
|
|
"Type check failed in signature for curry_shuffle: %s should be %s", |
1097
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1098
|
|
|
|
|
|
|
); |
1099
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1100
|
1
|
|
|
0
|
|
4
|
return sub { Hydrogen::ArrayRef::shuffle( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1101
|
|
|
|
|
|
|
} |
1102
|
|
|
|
|
|
|
|
1103
|
|
|
|
|
|
|
=head2 C<< curry_shuffle_in_place( $arrayref ) >> |
1104
|
|
|
|
|
|
|
|
1105
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::shuffle_in_place >>. |
1106
|
|
|
|
|
|
|
|
1107
|
|
|
|
|
|
|
=cut |
1108
|
|
|
|
|
|
|
|
1109
|
|
|
|
|
|
|
sub curry_shuffle_in_place { |
1110
|
1
|
50
|
|
1
|
1
|
3213
|
@_ == 1 |
1111
|
|
|
|
|
|
|
or Hydrogen::croak( |
1112
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_shuffle_in_place: got %d, %s", |
1113
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1114
|
|
|
|
|
|
|
); |
1115
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
1116
|
|
|
|
|
|
|
or Hydrogen::croak( |
1117
|
|
|
|
|
|
|
"Type check failed in signature for curry_shuffle_in_place: %s should be %s", |
1118
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1119
|
|
|
|
|
|
|
); |
1120
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1121
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::shuffle_in_place( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1122
|
|
|
|
|
|
|
} |
1123
|
|
|
|
|
|
|
|
1124
|
|
|
|
|
|
|
=head2 C<< curry_sort( $arrayref ) >> |
1125
|
|
|
|
|
|
|
|
1126
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::sort >>. |
1127
|
|
|
|
|
|
|
|
1128
|
|
|
|
|
|
|
=cut |
1129
|
|
|
|
|
|
|
|
1130
|
|
|
|
|
|
|
sub curry_sort { |
1131
|
1
|
50
|
|
1
|
1
|
2846
|
@_ == 1 |
1132
|
|
|
|
|
|
|
or Hydrogen::croak( |
1133
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_sort: got %d, %s", |
1134
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1135
|
|
|
|
|
|
|
); |
1136
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
1137
|
|
|
|
|
|
|
or Hydrogen::croak( |
1138
|
|
|
|
|
|
|
"Type check failed in signature for curry_sort: %s should be %s", |
1139
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1140
|
|
|
|
|
|
|
); |
1141
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1142
|
1
|
|
|
0
|
|
17
|
return sub { Hydrogen::ArrayRef::sort( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1143
|
|
|
|
|
|
|
} |
1144
|
|
|
|
|
|
|
|
1145
|
|
|
|
|
|
|
=head2 C<< curry_sort_in_place( $arrayref ) >> |
1146
|
|
|
|
|
|
|
|
1147
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::sort_in_place >>. |
1148
|
|
|
|
|
|
|
|
1149
|
|
|
|
|
|
|
=cut |
1150
|
|
|
|
|
|
|
|
1151
|
|
|
|
|
|
|
sub curry_sort_in_place { |
1152
|
1
|
50
|
|
1
|
1
|
2815
|
@_ == 1 |
1153
|
|
|
|
|
|
|
or Hydrogen::croak( |
1154
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_sort_in_place: got %d, %s", |
1155
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1156
|
|
|
|
|
|
|
); |
1157
|
1
|
50
|
|
|
|
5
|
(ref($_[0]) eq 'ARRAY') |
1158
|
|
|
|
|
|
|
or Hydrogen::croak( |
1159
|
|
|
|
|
|
|
"Type check failed in signature for curry_sort_in_place: %s should be %s", |
1160
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1161
|
|
|
|
|
|
|
); |
1162
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1163
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::sort_in_place( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1164
|
|
|
|
|
|
|
} |
1165
|
|
|
|
|
|
|
|
1166
|
|
|
|
|
|
|
=head2 C<< curry_splice( $arrayref ) >> |
1167
|
|
|
|
|
|
|
|
1168
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::splice >>. |
1169
|
|
|
|
|
|
|
|
1170
|
|
|
|
|
|
|
=cut |
1171
|
|
|
|
|
|
|
|
1172
|
|
|
|
|
|
|
sub curry_splice { |
1173
|
1
|
50
|
|
1
|
1
|
2851
|
@_ == 1 |
1174
|
|
|
|
|
|
|
or Hydrogen::croak( |
1175
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_splice: got %d, %s", |
1176
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1177
|
|
|
|
|
|
|
); |
1178
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
1179
|
|
|
|
|
|
|
or Hydrogen::croak( |
1180
|
|
|
|
|
|
|
"Type check failed in signature for curry_splice: %s should be %s", |
1181
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1182
|
|
|
|
|
|
|
); |
1183
|
1
|
|
|
|
|
5
|
my $ref = \$_[0]; |
1184
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::splice( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1185
|
|
|
|
|
|
|
} |
1186
|
|
|
|
|
|
|
|
1187
|
|
|
|
|
|
|
=head2 C<< curry_sum( $arrayref ) >> |
1188
|
|
|
|
|
|
|
|
1189
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::sum >>. |
1190
|
|
|
|
|
|
|
|
1191
|
|
|
|
|
|
|
=cut |
1192
|
|
|
|
|
|
|
|
1193
|
|
|
|
|
|
|
sub curry_sum { |
1194
|
1
|
50
|
|
1
|
1
|
2890
|
@_ == 1 |
1195
|
|
|
|
|
|
|
or Hydrogen::croak( |
1196
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_sum: got %d, %s", |
1197
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1198
|
|
|
|
|
|
|
); |
1199
|
1
|
50
|
|
|
|
7
|
(ref($_[0]) eq 'ARRAY') |
1200
|
|
|
|
|
|
|
or Hydrogen::croak( |
1201
|
|
|
|
|
|
|
"Type check failed in signature for curry_sum: %s should be %s", |
1202
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1203
|
|
|
|
|
|
|
); |
1204
|
1
|
|
|
|
|
4
|
my $ref = \$_[0]; |
1205
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::sum( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1206
|
|
|
|
|
|
|
} |
1207
|
|
|
|
|
|
|
|
1208
|
|
|
|
|
|
|
=head2 C<< curry_tail( $arrayref ) >> |
1209
|
|
|
|
|
|
|
|
1210
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::tail >>. |
1211
|
|
|
|
|
|
|
|
1212
|
|
|
|
|
|
|
=cut |
1213
|
|
|
|
|
|
|
|
1214
|
|
|
|
|
|
|
sub curry_tail { |
1215
|
1
|
50
|
|
1
|
1
|
2854
|
@_ == 1 |
1216
|
|
|
|
|
|
|
or Hydrogen::croak( |
1217
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_tail: got %d, %s", |
1218
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1219
|
|
|
|
|
|
|
); |
1220
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
1221
|
|
|
|
|
|
|
or Hydrogen::croak( |
1222
|
|
|
|
|
|
|
"Type check failed in signature for curry_tail: %s should be %s", |
1223
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1224
|
|
|
|
|
|
|
); |
1225
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1226
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::tail( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1227
|
|
|
|
|
|
|
} |
1228
|
|
|
|
|
|
|
|
1229
|
|
|
|
|
|
|
=head2 C<< curry_uniq( $arrayref ) >> |
1230
|
|
|
|
|
|
|
|
1231
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::uniq >>. |
1232
|
|
|
|
|
|
|
|
1233
|
|
|
|
|
|
|
=cut |
1234
|
|
|
|
|
|
|
|
1235
|
|
|
|
|
|
|
sub curry_uniq { |
1236
|
1
|
50
|
|
1
|
1
|
2790
|
@_ == 1 |
1237
|
|
|
|
|
|
|
or Hydrogen::croak( |
1238
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_uniq: got %d, %s", |
1239
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1240
|
|
|
|
|
|
|
); |
1241
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
1242
|
|
|
|
|
|
|
or Hydrogen::croak( |
1243
|
|
|
|
|
|
|
"Type check failed in signature for curry_uniq: %s should be %s", |
1244
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1245
|
|
|
|
|
|
|
); |
1246
|
1
|
|
|
|
|
6
|
my $ref = \$_[0]; |
1247
|
1
|
|
|
0
|
|
6
|
return sub { Hydrogen::ArrayRef::uniq( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1248
|
|
|
|
|
|
|
} |
1249
|
|
|
|
|
|
|
|
1250
|
|
|
|
|
|
|
=head2 C<< curry_uniq_in_place( $arrayref ) >> |
1251
|
|
|
|
|
|
|
|
1252
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::uniq_in_place >>. |
1253
|
|
|
|
|
|
|
|
1254
|
|
|
|
|
|
|
=cut |
1255
|
|
|
|
|
|
|
|
1256
|
|
|
|
|
|
|
sub curry_uniq_in_place { |
1257
|
1
|
50
|
|
1
|
1
|
2828
|
@_ == 1 |
1258
|
|
|
|
|
|
|
or Hydrogen::croak( |
1259
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_uniq_in_place: got %d, %s", |
1260
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1261
|
|
|
|
|
|
|
); |
1262
|
1
|
50
|
|
|
|
24
|
(ref($_[0]) eq 'ARRAY') |
1263
|
|
|
|
|
|
|
or Hydrogen::croak( |
1264
|
|
|
|
|
|
|
"Type check failed in signature for curry_uniq_in_place: %s should be %s", |
1265
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1266
|
|
|
|
|
|
|
); |
1267
|
1
|
|
|
|
|
14
|
my $ref = \$_[0]; |
1268
|
1
|
|
|
0
|
|
9
|
return sub { Hydrogen::ArrayRef::uniq_in_place( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1269
|
|
|
|
|
|
|
} |
1270
|
|
|
|
|
|
|
|
1271
|
|
|
|
|
|
|
=head2 C<< curry_uniqnum( $arrayref ) >> |
1272
|
|
|
|
|
|
|
|
1273
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::uniqnum >>. |
1274
|
|
|
|
|
|
|
|
1275
|
|
|
|
|
|
|
=cut |
1276
|
|
|
|
|
|
|
|
1277
|
|
|
|
|
|
|
sub curry_uniqnum { |
1278
|
1
|
50
|
|
1
|
1
|
2846
|
@_ == 1 |
1279
|
|
|
|
|
|
|
or Hydrogen::croak( |
1280
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_uniqnum: got %d, %s", |
1281
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1282
|
|
|
|
|
|
|
); |
1283
|
1
|
50
|
|
|
|
7
|
(ref($_[0]) eq 'ARRAY') |
1284
|
|
|
|
|
|
|
or Hydrogen::croak( |
1285
|
|
|
|
|
|
|
"Type check failed in signature for curry_uniqnum: %s should be %s", |
1286
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1287
|
|
|
|
|
|
|
); |
1288
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1289
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::uniqnum( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1290
|
|
|
|
|
|
|
} |
1291
|
|
|
|
|
|
|
|
1292
|
|
|
|
|
|
|
=head2 C<< curry_uniqnum_in_place( $arrayref ) >> |
1293
|
|
|
|
|
|
|
|
1294
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::uniqnum_in_place >>. |
1295
|
|
|
|
|
|
|
|
1296
|
|
|
|
|
|
|
=cut |
1297
|
|
|
|
|
|
|
|
1298
|
|
|
|
|
|
|
sub curry_uniqnum_in_place { |
1299
|
1
|
50
|
|
1
|
1
|
2839
|
@_ == 1 |
1300
|
|
|
|
|
|
|
or Hydrogen::croak( |
1301
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_uniqnum_in_place: got %d, %s", |
1302
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1303
|
|
|
|
|
|
|
); |
1304
|
1
|
50
|
|
|
|
6
|
(ref($_[0]) eq 'ARRAY') |
1305
|
|
|
|
|
|
|
or Hydrogen::croak( |
1306
|
|
|
|
|
|
|
"Type check failed in signature for curry_uniqnum_in_place: %s should be %s", |
1307
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1308
|
|
|
|
|
|
|
); |
1309
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1310
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::uniqnum_in_place( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1311
|
|
|
|
|
|
|
} |
1312
|
|
|
|
|
|
|
|
1313
|
|
|
|
|
|
|
=head2 C<< curry_uniqstr( $arrayref ) >> |
1314
|
|
|
|
|
|
|
|
1315
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::uniqstr >>. |
1316
|
|
|
|
|
|
|
|
1317
|
|
|
|
|
|
|
=cut |
1318
|
|
|
|
|
|
|
|
1319
|
|
|
|
|
|
|
sub curry_uniqstr { |
1320
|
1
|
50
|
|
1
|
1
|
2816
|
@_ == 1 |
1321
|
|
|
|
|
|
|
or Hydrogen::croak( |
1322
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_uniqstr: got %d, %s", |
1323
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1324
|
|
|
|
|
|
|
); |
1325
|
1
|
50
|
|
|
|
14
|
(ref($_[0]) eq 'ARRAY') |
1326
|
|
|
|
|
|
|
or Hydrogen::croak( |
1327
|
|
|
|
|
|
|
"Type check failed in signature for curry_uniqstr: %s should be %s", |
1328
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1329
|
|
|
|
|
|
|
); |
1330
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1331
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::uniqstr( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1332
|
|
|
|
|
|
|
} |
1333
|
|
|
|
|
|
|
|
1334
|
|
|
|
|
|
|
=head2 C<< curry_uniqstr_in_place( $arrayref ) >> |
1335
|
|
|
|
|
|
|
|
1336
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::uniqstr_in_place >>. |
1337
|
|
|
|
|
|
|
|
1338
|
|
|
|
|
|
|
=cut |
1339
|
|
|
|
|
|
|
|
1340
|
|
|
|
|
|
|
sub curry_uniqstr_in_place { |
1341
|
1
|
50
|
|
1
|
1
|
2792
|
@_ == 1 |
1342
|
|
|
|
|
|
|
or Hydrogen::croak( |
1343
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_uniqstr_in_place: got %d, %s", |
1344
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1345
|
|
|
|
|
|
|
); |
1346
|
1
|
50
|
|
|
|
8
|
(ref($_[0]) eq 'ARRAY') |
1347
|
|
|
|
|
|
|
or Hydrogen::croak( |
1348
|
|
|
|
|
|
|
"Type check failed in signature for curry_uniqstr_in_place: %s should be %s", |
1349
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1350
|
|
|
|
|
|
|
); |
1351
|
1
|
|
|
|
|
5
|
my $ref = \$_[0]; |
1352
|
1
|
|
|
0
|
|
7
|
return sub { Hydrogen::ArrayRef::uniqstr_in_place( $$ref, @_ ) }; |
|
0
|
|
|
|
|
0
|
|
1353
|
|
|
|
|
|
|
} |
1354
|
|
|
|
|
|
|
|
1355
|
|
|
|
|
|
|
=head2 C<< curry_unshift( $arrayref ) >> |
1356
|
|
|
|
|
|
|
|
1357
|
|
|
|
|
|
|
Curry the first argument of C<< Hydrogen::ArrayRef::unshift >>. |
1358
|
|
|
|
|
|
|
|
1359
|
|
|
|
|
|
|
=cut |
1360
|
|
|
|
|
|
|
|
1361
|
|
|
|
|
|
|
sub curry_unshift { |
1362
|
1
|
50
|
|
1
|
1
|
2853
|
@_ == 1 |
1363
|
|
|
|
|
|
|
or Hydrogen::croak( |
1364
|
|
|
|
|
|
|
"Wrong number of parameters in signature for curry_unshift: got %d, %s", |
1365
|
|
|
|
|
|
|
scalar(@_), "expected exactly 1 parameter" |
1366
|
|
|
|
|
|
|
); |
1367
|
1
|
50
|
|
|
|
7
|
(ref($_[0]) eq 'ARRAY') |
1368
|
|
|
|
|
|
|
or Hydrogen::croak( |
1369
|
|
|
|
|
|
|
"Type check failed in signature for curry_unshift: %s should be %s", |
1370
|
|
|
|
|
|
|
"\\$_[0]", "ArrayRef" |
1371
|
|
|
|
|
|
|
); |
1372
|
1
|
|
|
|
|
3
|
my $ref = \$_[0]; |
1373
|
1
|
|
|
0
|
|
5
|
return sub { Hydrogen::ArrayRef::unshift( $$ref, @_ ) }; |
|
0
|
|
|
|
|
|
|
1374
|
|
|
|
|
|
|
} |
1375
|
|
|
|
|
|
|
|
1376
|
|
|
|
|
|
|
1; |
1377
|
|
|
|
|
|
|
|
1378
|
|
|
|
|
|
|
=head1 EXPORT |
1379
|
|
|
|
|
|
|
|
1380
|
|
|
|
|
|
|
No functions are exported by this module by default. To import them all (this is usually a bad idea), use: |
1381
|
|
|
|
|
|
|
|
1382
|
|
|
|
|
|
|
use Hydrogen::Curry::ArrayRef -all; |
1383
|
|
|
|
|
|
|
|
1384
|
|
|
|
|
|
|
To import a particular function, use: |
1385
|
|
|
|
|
|
|
|
1386
|
|
|
|
|
|
|
use Hydrogen::Curry::ArrayRef 'curry_all_true'; |
1387
|
|
|
|
|
|
|
|
1388
|
|
|
|
|
|
|
To rename functions: |
1389
|
|
|
|
|
|
|
|
1390
|
|
|
|
|
|
|
use Hydrogen::Curry::ArrayRef 'curry_all_true' => { -as => 'myfunc' }; |
1391
|
|
|
|
|
|
|
|
1392
|
|
|
|
|
|
|
On Perl 5.37.2+ (or if L is installed) you can import lexically: |
1393
|
|
|
|
|
|
|
|
1394
|
|
|
|
|
|
|
use Hydrogen::Curry::ArrayRef -lexical, 'curry_all_true'; |
1395
|
|
|
|
|
|
|
|
1396
|
|
|
|
|
|
|
See L for more hints on importing. |
1397
|
|
|
|
|
|
|
|
1398
|
|
|
|
|
|
|
=head1 BUGS |
1399
|
|
|
|
|
|
|
|
1400
|
|
|
|
|
|
|
Please report any bugs to |
1401
|
|
|
|
|
|
|
L. |
1402
|
|
|
|
|
|
|
|
1403
|
|
|
|
|
|
|
=head1 SEE ALSO |
1404
|
|
|
|
|
|
|
|
1405
|
|
|
|
|
|
|
L, |
1406
|
|
|
|
|
|
|
L, |
1407
|
|
|
|
|
|
|
L, |
1408
|
|
|
|
|
|
|
L, |
1409
|
|
|
|
|
|
|
L, |
1410
|
|
|
|
|
|
|
L, |
1411
|
|
|
|
|
|
|
L. |
1412
|
|
|
|
|
|
|
|
1413
|
|
|
|
|
|
|
=head1 AUTHOR |
1414
|
|
|
|
|
|
|
|
1415
|
|
|
|
|
|
|
Toby Inkster Etobyink@cpan.orgE. |
1416
|
|
|
|
|
|
|
|
1417
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENCE |
1418
|
|
|
|
|
|
|
|
1419
|
|
|
|
|
|
|
This software is copyright (c) 2022-2023 by Toby Inkster. |
1420
|
|
|
|
|
|
|
|
1421
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
1422
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
1423
|
|
|
|
|
|
|
|
1424
|
|
|
|
|
|
|
=head1 DISCLAIMER OF WARRANTIES |
1425
|
|
|
|
|
|
|
|
1426
|
|
|
|
|
|
|
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED |
1427
|
|
|
|
|
|
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF |
1428
|
|
|
|
|
|
|
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
1429
|
|
|
|
|
|
|
|