• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

inc/ExtUtils/H26-Oct-2019-305169

lib/List/H26-Oct-2019-1,544484

t/H26-Oct-2019-2,3321,894

xt/H26-Oct-2019-354274

CODE_OF_CONDUCT.mdH A D26-Oct-20193.2 KiB7656

CONTRIBUTING.mdH A D26-Oct-20193.8 KiB11174

ChangesH A D26-Oct-201915.4 KiB586359

INSTALLH A D26-Oct-20192.2 KiB7346

LICENSEH A D26-Oct-201918 KiB380292

MANIFESTH A D26-Oct-2019768 4241

META.jsonH A D26-Oct-201939.2 KiB1,1721,170

META.ymlH A D26-Oct-201925.1 KiB884883

Makefile.PLH A D26-Oct-20193.8 KiB140119

README.mdH A D26-Oct-201924.8 KiB799520

cpanfileH A D26-Oct-20191.9 KiB6459

dist.iniH A D26-Oct-2019706 2723

perlcriticrcH A D26-Oct-20191.9 KiB7149

perltidyrcH A D26-Oct-2019301 2322

tidyall.iniH A D26-Oct-2019776 3835

README.md

1# NAME
2
3List::SomeUtils - Provide the stuff missing in List::Util
4
5# VERSION
6
7version 0.58
8
9# SYNOPSIS
10
11    # import specific functions
12    use List::SomeUtils qw( any uniq );
13
14    if ( any {/foo/} uniq @has_duplicates ) {
15
16        # do stuff
17    }
18
19    # import everything
20    use List::SomeUtils ':all';
21
22# DESCRIPTION
23
24**List::SomeUtils** provides some trivial but commonly needed functionality on
25lists which is not going to go into [List::Util](https://metacpan.org/pod/List::Util).
26
27All of the below functions are implementable in only a couple of lines of Perl
28code. Using the functions from this module however should give slightly better
29performance as everything is implemented in C. The pure-Perl implementation of
30these functions only serves as a fallback in case the C portions of this module
31couldn't be compiled on this machine.
32
33# WHY DOES THIS MODULE EXIST?
34
35You might wonder why this module exists when we already have
36[List::MoreUtils](https://metacpan.org/pod/List::MoreUtils). In fact, this module is (nearly) the same code as is found
37in LMU with no significant changes. However, the LMU distribution depends on
38several modules for configuration (to run the Makefile.PL) that some folks in
39the Perl community don't think are appropriate for a module high upstream in
40the CPAN river.
41
42I (Dave Rolsky) don't have a strong opinion on this, but I _do_ like the
43functions provided by LMU, and I'm tired of getting patches and PRs to remove
44LMU from my code.
45
46This distribution exists to let me use the functionality I like without having
47to get into tiring arguments about issues I don't really care about.
48
49# EXPORTS
50
51## Default behavior
52
53Nothing by default. To import all of this module's symbols use the `:all` tag.
54Otherwise functions can be imported by name as usual:
55
56    use List::SomeUtils ':all';
57
58    use List::SomeUtils qw{ any firstidx };
59
60Because historical changes to the API might make upgrading List::SomeUtils
61difficult for some projects, the legacy API is available via special import
62tags.
63
64# FUNCTIONS
65
66## Junctions
67
68### _Treatment of an empty list_
69
70There are two schools of thought for how to evaluate a junction on an
71empty list:
72
73- Reduction to an identity (boolean)
74- Result is undefined (three-valued)
75
76In the first case, the result of the junction applied to the empty list is
77determined by a mathematical reduction to an identity depending on whether
78the underlying comparison is "or" or "and".  Conceptually:
79
80                    "any are true"      "all are true"
81                    --------------      --------------
82    2 elements:     A || B || 0         A && B && 1
83    1 element:      A || 0              A && 1
84    0 elements:     0                   1
85
86In the second case, three-value logic is desired, in which a junction
87applied to an empty list returns `undef` rather than true or false
88
89Junctions with a `_u` suffix implement three-valued logic.  Those
90without are boolean.
91
92### all BLOCK LIST
93
94### all\_u BLOCK LIST
95
96Returns a true value if all items in LIST meet the criterion given through
97BLOCK. Sets `$_` for each item in LIST in turn:
98
99    print "All values are non-negative"
100      if all { $_ >= 0 } ($x, $y, $z);
101
102For an empty LIST, `all` returns true (i.e. no values failed the condition)
103and `all_u` returns `undef`.
104
105Thus, `all_u(@list)` is equivalent to `@list ? all(@list) : undef`.
106
107**Note**: because Perl treats `undef` as false, you must check the return value
108of `all_u` with `defined` or you will get the opposite result of what you
109expect.
110
111### any BLOCK LIST
112
113### any\_u BLOCK LIST
114
115Returns a true value if any item in LIST meets the criterion given through
116BLOCK. Sets `$_` for each item in LIST in turn:
117
118    print "At least one non-negative value"
119      if any { $_ >= 0 } ($x, $y, $z);
120
121For an empty LIST, `any` returns false and `any_u` returns `undef`.
122
123Thus, `any_u(@list)` is equivalent to `@list ? any(@list) : undef`.
124
125### none BLOCK LIST
126
127### none\_u BLOCK LIST
128
129Logically the negation of `any`. Returns a true value if no item in LIST meets
130the criterion given through BLOCK. Sets `$_` for each item in LIST in turn:
131
132    print "No non-negative values"
133      if none { $_ >= 0 } ($x, $y, $z);
134
135For an empty LIST, `none` returns true (i.e. no values failed the condition)
136and `none_u` returns `undef`.
137
138Thus, `none_u(@list)` is equivalent to `@list ? none(@list) : undef`.
139
140**Note**: because Perl treats `undef` as false, you must check the return value
141of `none_u` with `defined` or you will get the opposite result of what you
142expect.
143
144### notall BLOCK LIST
145
146### notall\_u BLOCK LIST
147
148Logically the negation of `all`. Returns a true value if not all items in LIST
149meet the criterion given through BLOCK. Sets `$_` for each item in LIST in
150turn:
151
152    print "Not all values are non-negative"
153      if notall { $_ >= 0 } ($x, $y, $z);
154
155For an empty LIST, `notall` returns false and `notall_u` returns `undef`.
156
157Thus, `notall_u(@list)` is equivalent to `@list ? notall(@list) : undef`.
158
159### one BLOCK LIST
160
161### one\_u BLOCK LIST
162
163Returns a true value if precisely one item in LIST meets the criterion
164given through BLOCK. Sets `$_` for each item in LIST in turn:
165
166    print "Precisely one value defined"
167        if one { defined($_) } @list;
168
169Returns false otherwise.
170
171For an empty LIST, `one` returns false and `one_u` returns `undef`.
172
173The expression `one BLOCK LIST` is almost equivalent to
174`1 == true BLOCK LIST`, except for short-cutting.
175Evaluation of BLOCK will immediately stop at the second true value.
176
177## Transformation
178
179### apply BLOCK LIST
180
181Makes a copy of the list and then passes each element _from the copy_ to the
182BLOCK. Any changes or assignments to `$_` in the BLOCK will only affect the
183elements of the new list. However, if `$_` is a reference then changes to the
184referenced value will be seen in both the original and new list.
185
186This function is similar to `map` but will not modify the elements of the
187input list:
188
189    my @list = (1 .. 4);
190    my @mult = apply { $_ *= 2 } @list;
191    print "\@list = @list\n";
192    print "\@mult = @mult\n";
193    __END__
194    @list = 1 2 3 4
195    @mult = 2 4 6 8
196
197Think of it as syntactic sugar for
198
199    for (my @mult = @list) { $_ *= 2 }
200
201Note that you must alter `$_` directly inside BLOCK in order for changes to
202make effect. New value returned from the BLOCK are ignored:
203
204    # @new is identical to @list.
205    my @new = apply { $_ * 2 } @list;
206
207    # @new is different from @list
208    my @new = apply { $_ =* 2 } @list;
209
210### insert\_after BLOCK VALUE LIST
211
212Inserts VALUE after the first item in LIST for which the criterion in BLOCK is
213true. Sets `$_` for each item in LIST in turn.
214
215    my @list = qw/This is a list/;
216    insert_after { $_ eq "a" } "longer" => @list;
217    print "@list";
218    __END__
219    This is a longer list
220
221### insert\_after\_string STRING VALUE LIST
222
223Inserts VALUE after the first item in LIST which is equal to STRING.
224
225    my @list = qw/This is a list/;
226    insert_after_string "a", "longer" => @list;
227    print "@list";
228    __END__
229    This is a longer list
230
231### pairwise BLOCK ARRAY1 ARRAY2
232
233Evaluates BLOCK for each pair of elements in ARRAY1 and ARRAY2 and returns a
234new list consisting of BLOCK's return values. The two elements are set to `$a`
235and `$b`.  Note that those two are aliases to the original value so changing
236them will modify the input arrays.
237
238    @a = (1 .. 5);
239    @b = (11 .. 15);
240    @x = pairwise { $a + $b } @a, @b;     # returns 12, 14, 16, 18, 20
241
242    # mesh with pairwise
243    @a = qw/a b c/;
244    @b = qw/1 2 3/;
245    @x = pairwise { ($a, $b) } @a, @b;    # returns a, 1, b, 2, c, 3
246
247### mesh ARRAY1 ARRAY2 \[ ARRAY3 ... \]
248
249### zip ARRAY1 ARRAY2 \[ ARRAY3 ... \]
250
251Returns a list consisting of the first elements of each array, then
252the second, then the third, etc, until all arrays are exhausted.
253
254Examples:
255
256    @x = qw/a b c d/;
257    @y = qw/1 2 3 4/;
258    @z = mesh @x, @y;         # returns a, 1, b, 2, c, 3, d, 4
259
260    @a = ('x');
261    @b = ('1', '2');
262    @c = qw/zip zap zot/;
263    @d = mesh @a, @b, @c;   # x, 1, zip, undef, 2, zap, undef, undef, zot
264
265`zip` is an alias for `mesh`.
266
267### uniq LIST
268
269### distinct LIST
270
271Returns a new list by stripping duplicate values in LIST by comparing
272the values as hash keys, except that undef is considered separate from ''.
273The order of elements in the returned list is the same as in LIST. In
274scalar context, returns the number of unique elements in LIST.
275
276    my @x = uniq 1, 1, 2, 2, 3, 5, 3, 4; # returns 1 2 3 5 4
277    my $x = uniq 1, 1, 2, 2, 3, 5, 3, 4; # returns 5
278    # returns "Mike", "Michael", "Richard", "Rick"
279    my @n = distinct "Mike", "Michael", "Richard", "Rick", "Michael", "Rick"
280    # returns '', undef, 'S1', A5'
281    my @s = distinct '', undef, 'S1', 'A5'
282    # returns '', undef, 'S1', A5'
283    my @w = uniq undef, '', 'S1', 'A5'
284
285`distinct` is an alias for `uniq`.
286
287**RT#49800** can be used to give feedback about this behavior.
288
289### singleton
290
291Returns a new list by stripping values in LIST occurring more than once by
292comparing the values as hash keys, except that undef is considered separate
293from ''.  The order of elements in the returned list is the same as in LIST.
294In scalar context, returns the number of elements occurring only once in LIST.
295
296    my @x = singleton 1,1,2,2,3,4,5 # returns 3 4 5
297
298## Partitioning
299
300### after BLOCK LIST
301
302Returns a list of the values of LIST after (and not including) the point
303where BLOCK returns a true value. Sets `$_` for each element in LIST in turn.
304
305    @x = after { $_ % 5 == 0 } (1..9);    # returns 6, 7, 8, 9
306
307### after\_incl BLOCK LIST
308
309Same as `after` but also includes the element for which BLOCK is true.
310
311### before BLOCK LIST
312
313Returns a list of values of LIST up to (and not including) the point where BLOCK
314returns a true value. Sets `$_` for each element in LIST in turn.
315
316### before\_incl BLOCK LIST
317
318Same as `before` but also includes the element for which BLOCK is true.
319
320### part BLOCK LIST
321
322Partitions LIST based on the return value of BLOCK which denotes into which
323partition the current value is put.
324
325Returns a list of the partitions thusly created. Each partition created is a
326reference to an array.
327
328    my $i = 0;
329    my @part = part { $i++ % 2 } 1 .. 8;   # returns [1, 3, 5, 7], [2, 4, 6, 8]
330
331You can have a sparse list of partitions as well where non-set partitions will
332be undef:
333
334    my @part = part { 2 } 1 .. 10;            # returns undef, undef, [ 1 .. 10 ]
335
336Be careful with negative values, though:
337
338    my @part = part { -1 } 1 .. 10;
339    __END__
340    Modification of non-creatable array value attempted, subscript -1 ...
341
342Negative values are only ok when they refer to a partition previously created:
343
344    my @idx  = ( 0, 1, -1 );
345    my $i    = 0;
346    my @part = part { $idx[$i++ % 3] } 1 .. 8; # [1, 4, 7], [2, 3, 5, 6, 8]
347
348## Iteration
349
350### each\_array ARRAY1 ARRAY2 ...
351
352Creates an array iterator to return the elements of the list of arrays ARRAY1,
353ARRAY2 throughout ARRAYn in turn.  That is, the first time it is called, it
354returns the first element of each array.  The next time, it returns the second
355elements.  And so on, until all elements are exhausted.
356
357This is useful for looping over more than one array at once:
358
359    my $ea = each_array(@a, @b, @c);
360    while ( my ($a, $b, $c) = $ea->() )   { .... }
361
362The iterator returns the empty list when it reached the end of all arrays.
363
364If the iterator is passed an argument of '`index`', then it returns
365the index of the last fetched set of values, as a scalar.
366
367### each\_arrayref LIST
368
369Like each\_array, but the arguments are references to arrays, not the
370plain arrays.
371
372### natatime EXPR, LIST
373
374Creates an array iterator, for looping over an array in chunks of
375`$n` items at a time.  (n at a time, get it?).  An example is
376probably a better explanation than I could give in words.
377
378Example:
379
380    my @x = ('a' .. 'g');
381    my $it = natatime 3, @x;
382    while (my @vals = $it->())
383    {
384      print "@vals\n";
385    }
386
387This prints
388
389    a b c
390    d e f
391    g
392
393## Searching
394
395### bsearch BLOCK LIST
396
397Performs a binary search on LIST which must be a sorted list of values. BLOCK
398must return a negative value if the current element (stored in `$_`) is smaller,
399a positive value if it is bigger and zero if it matches.
400
401Returns a boolean value in scalar context. In list context, it returns the element
402if it was found, otherwise the empty list.
403
404### bsearchidx BLOCK LIST
405
406### bsearch\_index BLOCK LIST
407
408Performs a binary search on LIST which must be a sorted list of values. BLOCK
409must return a negative value if the current element (stored in `$_`) is smaller,
410a positive value if it is bigger and zero if it matches.
411
412Returns the index of found element, otherwise `-1`.
413
414`bsearch_index` is an alias for `bsearchidx`.
415
416### firstval BLOCK LIST
417
418### first\_value BLOCK LIST
419
420Returns the first element in LIST for which BLOCK evaluates to true. Each
421element of LIST is set to `$_` in turn. Returns `undef` if no such element
422has been found.
423
424`first_value` is an alias for `firstval`.
425
426### onlyval BLOCK LIST
427
428### only\_value BLOCK LIST
429
430Returns the only element in LIST for which BLOCK evaluates to true. Sets
431`$_` for each item in LIST in turn. Returns `undef` if no such element
432has been found.
433
434`only_value` is an alias for `onlyval`.
435
436### lastval BLOCK LIST
437
438### last\_value BLOCK LIST
439
440Returns the last value in LIST for which BLOCK evaluates to true. Each element
441of LIST is set to `$_` in turn. Returns `undef` if no such element has been
442found.
443
444`last_value` is an alias for `lastval`.
445
446### firstres BLOCK LIST
447
448### first\_result BLOCK LIST
449
450Returns the result of BLOCK for the first element in LIST for which BLOCK
451evaluates to true. Each element of LIST is set to `$_` in turn. Returns
452`undef` if no such element has been found.
453
454`first_result` is an alias for `firstres`.
455
456### onlyres BLOCK LIST
457
458### only\_result BLOCK LIST
459
460Returns the result of BLOCK for the first element in LIST for which BLOCK
461evaluates to true. Sets `$_` for each item in LIST in turn. Returns
462`undef` if no such element has been found.
463
464`only_result` is an alias for `onlyres`.
465
466### lastres BLOCK LIST
467
468### last\_result BLOCK LIST
469
470Returns the result of BLOCK for the last element in LIST for which BLOCK
471evaluates to true. Each element of LIST is set to `$_` in turn. Returns
472`undef` if no such element has been found.
473
474`last_result` is an alias for `lastres`.
475
476### indexes BLOCK LIST
477
478Evaluates BLOCK for each element in LIST (assigned to `$_`) and returns a list
479of the indices of those elements for which BLOCK returned a true value. This is
480just like `grep` only that it returns indices instead of values:
481
482    @x = indexes { $_ % 2 == 0 } (1..10);   # returns 1, 3, 5, 7, 9
483
484### firstidx BLOCK LIST
485
486### first\_index BLOCK LIST
487
488Returns the index of the first element in LIST for which the criterion in BLOCK
489is true. Sets `$_` for each item in LIST in turn:
490
491    my @list = (1, 4, 3, 2, 4, 6);
492    printf "item with index %i in list is 4", firstidx { $_ == 4 } @list;
493    __END__
494    item with index 1 in list is 4
495
496Returns `-1` if no such item could be found.
497
498`first_index` is an alias for `firstidx`.
499
500### onlyidx BLOCK LIST
501
502### only\_index BLOCK LIST
503
504Returns the index of the only element in LIST for which the criterion
505in BLOCK is true. Sets `$_` for each item in LIST in turn:
506
507    my @list = (1, 3, 4, 3, 2, 4);
508    printf "uniqe index of item 2 in list is %i", onlyidx { $_ == 2 } @list;
509    __END__
510    unique index of item 2 in list is 4
511
512Returns `-1` if either no such item or more than one of these
513has been found.
514
515`only_index` is an alias for `onlyidx`.
516
517### lastidx BLOCK LIST
518
519### last\_index BLOCK LIST
520
521Returns the index of the last element in LIST for which the criterion in BLOCK
522is true. Sets `$_` for each item in LIST in turn:
523
524    my @list = (1, 4, 3, 2, 4, 6);
525    printf "item with index %i in list is 4", lastidx { $_ == 4 } @list;
526    __END__
527    item with index 4 in list is 4
528
529Returns `-1` if no such item could be found.
530
531`last_index` is an alias for `lastidx`.
532
533## Sorting
534
535### sort\_by BLOCK LIST
536
537Returns the list of values sorted according to the string values returned by the
538KEYFUNC block or function. A typical use of this may be to sort objects according
539to the string value of some accessor, such as
540
541    sort_by { $_->name } @people
542
543The key function is called in scalar context, being passed each value in turn as
544both $\_ and the only argument in the parameters, @\_. The values are then sorted
545according to string comparisons on the values returned.
546This is equivalent to
547
548    sort { $a->name cmp $b->name } @people
549
550except that it guarantees the name accessor will be executed only once per value.
551One interesting use-case is to sort strings which may have numbers embedded in them
552"naturally", rather than lexically.
553
554    sort_by { s/(\d+)/sprintf "%09d", $1/eg; $_ } @strings
555
556This sorts strings by generating sort keys which zero-pad the embedded numbers to
557some level (9 digits in this case), helping to ensure the lexical sort puts them
558in the correct order.
559
560### nsort\_by BLOCK LIST
561
562Similar to sort\_by but compares its key values numerically.
563
564## Counting and calculation
565
566### true BLOCK LIST
567
568Counts the number of elements in LIST for which the criterion in BLOCK is true.
569Sets `$_` for  each item in LIST in turn:
570
571    printf "%i item(s) are defined", true { defined($_) } @list;
572
573### false BLOCK LIST
574
575Counts the number of elements in LIST for which the criterion in BLOCK is false.
576Sets `$_` for each item in LIST in turn:
577
578    printf "%i item(s) are not defined", false { defined($_) } @list;
579
580### minmax LIST
581
582Calculates the minimum and maximum of LIST and returns a two element list with
583the first element being the minimum and the second the maximum. Returns the
584empty list if LIST was empty.
585
586The `minmax` algorithm differs from a naive iteration over the list where each
587element is compared to two values being the so far calculated min and max value
588in that it only requires 3n/2 - 2 comparisons. Thus it is the most efficient
589possible algorithm.
590
591However, the Perl implementation of it has some overhead simply due to the fact
592that there are more lines of Perl code involved. Therefore, LIST needs to be
593fairly big in order for `minmax` to win over a naive implementation. This
594limitation does not apply to the XS version.
595
596### mode LIST
597
598Calculates the most common items in the list and returns them as a list. This
599is effectively done by string comparisons, so references will be
600stringified. If they implement string overloading, this will be used.
601
602If more than one item appears the same number of times in the list, all such
603items will be returned. For example, the mode of a unique list is the list
604itself.
605
606This function returns a list in list context. In scalar context it returns a
607count indicating the number of modes in the list.
608
609# MAINTENANCE
610
611The maintenance goal is to preserve the documented semantics of the API;
612bug fixes that bring actual behavior in line with semantics are allowed.
613New API functions may be added over time.  If a backwards incompatible
614change is unavoidable, we will attempt to provide support for the legacy
615API using the same export tag mechanism currently in place.
616
617This module attempts to use few non-core dependencies. Non-core
618configuration and testing modules will be bundled when reasonable;
619run-time dependencies will be added only if they deliver substantial
620benefit.
621
622# KNOWN ISSUES
623
624There is a problem with a bug in 5.6.x perls. It is a syntax error to write
625things like:
626
627    my @x = apply { s/foo/bar/ } qw{ foo bar baz };
628
629It has to be written as either
630
631    my @x = apply { s/foo/bar/ } 'foo', 'bar', 'baz';
632
633or
634
635    my @x = apply { s/foo/bar/ } my @dummy = qw/foo bar baz/;
636
637Perl 5.5.x and Perl 5.8.x don't suffer from this limitation.
638
639If you have a functionality that you could imagine being in this module, please
640drop me a line. This module's policy will be less strict than [List::Util](https://metacpan.org/pod/List::Util)'s
641when it comes to additions as it isn't a core module.
642
643When you report bugs, it would be nice if you could additionally give me the
644output of your program with the environment variable `LIST_MOREUTILS_PP` set
645to a true value. That way I know where to look for the problem (in XS,
646pure-Perl or possibly both).
647
648# THANKS
649
650## Tassilo von Parseval
651
652Credits go to a number of people: Steve Purkis for giving me namespace advice
653and James Keenan and Terrence Branno for their effort of keeping the CPAN
654tidier by making [List::Util](https://metacpan.org/pod/List::Util) obsolete.
655
656Brian McCauley suggested the inclusion of apply() and provided the pure-Perl
657implementation for it.
658
659Eric J. Roode asked me to add all functions from his module `List::SomeUtil`
660into this one. With minor modifications, the pure-Perl implementations of those
661are by him.
662
663The bunch of people who almost immediately pointed out the many problems with
664the glitchy 0.07 release (Slaven Rezic, Ron Savage, CPAN testers).
665
666A particularly nasty memory leak was spotted by Thomas A. Lowery.
667
668Lars Thegler made me aware of problems with older Perl versions.
669
670Anno Siegel de-orphaned each\_arrayref().
671
672David Filmer made me aware of a problem in each\_arrayref that could ultimately
673lead to a segfault.
674
675Ricardo Signes suggested the inclusion of part() and provided the
676Perl-implementation.
677
678Robin Huston kindly fixed a bug in perl's MULTICALL API to make the
679XS-implementation of part() work.
680
681## Jens Rehsack
682
683Credits goes to all people contributing feedback during the v0.400
684development releases.
685
686Special thanks goes to David Golden who spent a lot of effort to develop
687a design to support current state of CPAN as well as ancient software
688somewhere in the dark. He also contributed a lot of patches to refactor
689the API frontend to welcome any user of List::SomeUtils - from ancient
690past to recently last used.
691
692Toby Inkster provided a lot of useful feedback for sane importer code
693and was a nice sounding board for API discussions.
694
695Peter Rabbitson provided a sane git repository setup containing entire
696package history.
697
698# TODO
699
700A pile of requests from other people is still pending further processing in
701my mailbox. This includes:
702
703- List::Util export pass-through
704
705    Allow **List::SomeUtils** to pass-through the regular [List::Util](https://metacpan.org/pod/List::Util)
706    functions to end users only need to `use` the one module.
707
708- uniq\_by(&@)
709
710    Use code-reference to extract a key based on which the uniqueness is
711    determined. Suggested by Aaron Crane.
712
713- delete\_index
714- random\_item
715- random\_item\_delete\_index
716- list\_diff\_hash
717- list\_diff\_inboth
718- list\_diff\_infirst
719- list\_diff\_insecond
720
721    These were all suggested by Dan Muey.
722
723- listify
724
725    Always return a flat list when either a simple scalar value was passed or an
726    array-reference. Suggested by Mark Summersault.
727
728# SEE ALSO
729
730[List::Util](https://metacpan.org/pod/List::Util), [List::AllUtils](https://metacpan.org/pod/List::AllUtils), [List::UtilsBy](https://metacpan.org/pod/List::UtilsBy)
731
732# HISTORICAL COPYRIGHT
733
734Some parts copyright 2011 Aaron Crane.
735
736Copyright 2004 - 2010 by Tassilo von Parseval
737
738Copyright 2013 - 2015 by Jens Rehsack
739
740# SUPPORT
741
742Bugs may be submitted at [https://github.com/houseabsolute/List-SomeUtils/issues](https://github.com/houseabsolute/List-SomeUtils/issues).
743
744I am also usually active on IRC as 'autarch' on `irc://irc.perl.org`.
745
746# SOURCE
747
748The source code repository for List-SomeUtils can be found at [https://github.com/houseabsolute/List-SomeUtils](https://github.com/houseabsolute/List-SomeUtils).
749
750# DONATIONS
751
752If you'd like to thank me for the work I've done on this module, please
753consider making a "donation" to me via PayPal. I spend a lot of free time
754creating free software, and would appreciate any support you'd care to offer.
755
756Please note that **I am not suggesting that you must do this** in order for me
757to continue working on this particular software. I will continue to do so,
758inasmuch as I have in the past, for as long as it interests me.
759
760Similarly, a donation made in this way will probably not make me work on this
761software much more, unless I get so many donations that I can consider working
762on free software full time (let's all have a chuckle at that together).
763
764To donate, log into PayPal and send money to autarch@urth.org, or use the
765button at [http://www.urth.org/~autarch/fs-donation.html](http://www.urth.org/~autarch/fs-donation.html).
766
767# AUTHORS
768
769- Tassilo von Parseval <tassilo.von.parseval@rwth-aachen.de>
770- Adam Kennedy <adamk@cpan.org>
771- Jens Rehsack <rehsack@cpan.org>
772- Dave Rolsky <autarch@urth.org>
773
774# CONTRIBUTORS
775
776- Aaron Crane <arc@cpan.org>
777- BackPan <BackPan>
778- bay-max1 <34803732+bay-max1@users.noreply.github.com>
779- Brad Forschinger <bnjf@bnjf.id.au>
780- David Golden <dagolden@cpan.org>
781- jddurand <jeandamiendurand@free.fr>
782- Jens Rehsack <sno@netbsd.org>
783- J.R. Mash <jrmash@cpan.org>
784- Karen Etheridge <ether@cpan.org>
785- Ricardo Signes <rjbs@cpan.org>
786- Toby Inkster <mail@tobyinkster.co.uk>
787- Tokuhiro Matsuno <tokuhirom@cpan.org>
788- Tom Wyant <wyant@cpan.org>
789
790# COPYRIGHT AND LICENSE
791
792This software is copyright (c) 2019 by Dave Rolsky <autarch@urth.org>.
793
794This is free software; you can redistribute it and/or modify it under
795the same terms as the Perl 5 programming language system itself.
796
797The full text of the license can be found in the
798`LICENSE` file included with this distribution.
799