summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/common.ml
diff options
context:
space:
mode:
Diffstat (limited to 'perl_checker.src/common.ml')
-rw-r--r--perl_checker.src/common.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/perl_checker.src/common.ml b/perl_checker.src/common.ml
index 6a3be82..7d03ffb 100644
--- a/perl_checker.src/common.ml
+++ b/perl_checker.src/common.ml
@@ -475,6 +475,8 @@ let break_at f l =
in b [] l
let break v l = break_at ((=) v) l
+let drop_while f l = snd (break_at (fun e -> not (f e)) l)
+
(* break_at_indice 0 [1;2] gives [], [1;2]
break_at_indice 1 [1;2] gives [1], [2]
*)