Created
January 7, 2009 08:09
-
-
Save kyanny/44214 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
# $Id$ | |
use strict; | |
use warnings; | |
use File::Spec; | |
use FindBin; | |
use lib File::Spec->catdir($FindBin::Bin, "..", "lib"); | |
use Getopt::Long; | |
use Pod::Usage; | |
GetOptions(\my %opt, | |
"help", | |
); | |
use List::MoreUtils qw(any); | |
sub _member_of { | |
my ($atom, $list) = @_; | |
return any { $atom eq $_ } @$list; | |
} | |
use Test::More; | |
plan 'no_plan'; | |
ok _member_of(1, [1,2,3]); | |
ok ! _member_of(10, [1,2,3]); | |
ok any { 1 eq $_ } (1,2,3); | |
1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment