summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/common.ml
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-12-16 23:19:47 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-12-16 23:19:47 +0000
commit1380de10d149e919b37fd2d31fff48e7236a9072 (patch)
tree08e557faafa1ca8125b3098ac75a4ea6a6260f78 /perl_checker.src/common.ml
parent7cf3ead36d0548773cfb29c419120a8014d5cf88 (diff)
downloadperl-MDK-Common-1380de10d149e919b37fd2d31fff48e7236a9072.tar
perl-MDK-Common-1380de10d149e919b37fd2d31fff48e7236a9072.tar.gz
perl-MDK-Common-1380de10d149e919b37fd2d31fff48e7236a9072.tar.bz2
perl-MDK-Common-1380de10d149e919b37fd2d31fff48e7236a9072.tar.xz
perl-MDK-Common-1380de10d149e919b37fd2d31fff48e7236a9072.zip
disallow
- $a = (1, 2) - my $a = (1, 2) - my ($a, $b) = (1, 2, 3)
Diffstat (limited to 'perl_checker.src/common.ml')
-rw-r--r--perl_checker.src/common.ml5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl_checker.src/common.ml b/perl_checker.src/common.ml
index 554a65c..ddd6b08 100644
--- a/perl_checker.src/common.ml
+++ b/perl_checker.src/common.ml
@@ -185,6 +185,11 @@ let rec for_all2_ p l1 l2 =
| (a1::l1, a2::l2) -> p a1 a2 && for_all2_ p l1 l2
| (_, _) -> false
+let rec for_all2_true p l1 l2 =
+ match (l1, l2) with
+ | (a1::l1, a2::l2) -> p a1 a2 && for_all2_true p l1 l2
+ | (_, _) -> true
+
let maxl l = fold_right1 max l
let rec stack2list s =