~npalix/coccinelle/upstream

« back to all changes in this revision

Viewing changes to commons/ocamlextra/enum.ml

  • Committer: Sébastien Hinderer
  • Date: 2015-08-10 12:22:12 UTC
  • mto: (4116.2.93)
  • mto: This revision was merged to the branch mainline in revision 4121.
  • Revision ID: git-v1:848f85e256516330c06f5fd8dc782b854ed9aa03
Remove a bunch of trailing whitespaces and blank lines at end of files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(* 
 
1
(*
2
2
 * Enum - Enumeration over abstract collection of elements.
3
3
 * Copyright (C) 2003 Nicolas Cannasse
4
 
 * 
 
4
 *
5
5
 * This library is free software; you can redistribute it and/or
6
6
 * modify it under the terms of the GNU Lesser General Public
7
7
 * License as published by the Free Software Foundation; either
51
51
                                f (n - 1 - !count));
52
52
                clone = (fun () -> init !count f);
53
53
                fast = true;
54
 
        }                       
 
54
        }
55
55
 
56
56
let rec empty () =
57
57
        {
91
91
                dst.tl <- x;
92
92
                loop x
93
93
        in
94
 
        let enum = ref _empty  in 
 
94
        let enum = ref _empty  in
95
95
        (try
96
96
                enum := { hd = t.next(); tl = _empty };
97
97
                incr count;
339
339
    in
340
340
        from2 next (fun () -> filter_map f (t.clone()))
341
341
 
342
 
let rec append ta tb = 
 
342
let rec append ta tb =
343
343
        let t = {
344
344
                count = (fun () -> ta.count() + tb.count());
345
345
                next = _dummy;