Răsfoiți Sursa

Remove non-namespaced helper functions

Billy Barrow 4 zile în urmă
părinte
comite
9161ab1284

+ 1 - 1
src/lib/DataStructures/HashSet.vala

@@ -86,7 +86,7 @@ namespace Invercargill.DataStructures {
         }
         }
 
 
         public override Tracker<T> get_tracker () {
         public override Tracker<T> get_tracker () {
-            return range(0, n_buckets)
+            return Iterate.range(0, n_buckets)
                 .where(i => buckets[i] != null && buckets[i] != tombstone)
                 .where(i => buckets[i] != null && buckets[i] != tombstone)
                 .select<T>(i => buckets[i]->item)
                 .select<T>(i => buckets[i]->item)
                 .get_tracker();
                 .get_tracker();

+ 1 - 1
src/lib/DataStructures/SortedSeries.vala

@@ -69,7 +69,7 @@ namespace Invercargill.DataStructures {
 
 
         public override Tracker<T> get_tracker () {
         public override Tracker<T> get_tracker () {
             if(root == nil) {
             if(root == nil) {
-                return empty<T>().get_tracker();
+                return Iterate.nothing<T>().get_tracker();
             }
             }
             return new TreeTracker<T>(this);  
             return new TreeTracker<T>(this);  
         }
         }

+ 3 - 3
src/lib/Enumerable.vala

@@ -166,7 +166,7 @@ namespace Invercargill {
         public virtual Attempts<TOut> attempt_select_nested<TOut>(owned AttemptTransformDelegate<T, Enumerable<Attempt<TOut>>> transform) {
         public virtual Attempts<TOut> attempt_select_nested<TOut>(owned AttemptTransformDelegate<T, Enumerable<Attempt<TOut>>> transform) {
             return attempt_select<Enumerable<Attempt<TOut>>>((owned)transform)
             return attempt_select<Enumerable<Attempt<TOut>>>((owned)transform)
                 .as_enumerable()
                 .as_enumerable()
-                .select_many<Attempt<TOut>>(a => a.success ? a.result : Invercargill.single<Attempt<TOut>>(new Attempt<TOut>.unsuccessful(a.error)))
+                .select_many<Attempt<TOut>>(a => a.success ? a.result : Iterate.single<Attempt<TOut>>(new Attempt<TOut>.unsuccessful(a.error)))
                 .assert_promotion<Attempts>();
                 .assert_promotion<Attempts>();
         }
         }
 
 
@@ -412,11 +412,11 @@ namespace Invercargill {
         }
         }
 
 
         public virtual Enumerable<T> suffix_with(T item, uint times = 1) {
         public virtual Enumerable<T> suffix_with(T item, uint times = 1) {
-            return concat(range(0, (int)times, 1).select<T>(i => item));
+            return concat(Iterate.range(0, (int)times, 1).select<T>(i => item));
         }
         }
 
 
         public virtual Enumerable<T> prefix_with(T item, uint times = 1) {
         public virtual Enumerable<T> prefix_with(T item, uint times = 1) {
-            return range(0, (int)times, 1).select<T>(i => item).concat(this);
+            return Iterate.range(0, (int)times, 1).select<T>(i => item).concat(this);
         }
         }
 
 
         public virtual Partition<T> partition(PredicateDelegate<T> test) {
         public virtual Partition<T> partition(PredicateDelegate<T> test) {

+ 3 - 3
src/lib/EnumerableInfo.vala

@@ -36,8 +36,8 @@ namespace Invercargill {
             this.element_type = enumerable.element_type;
             this.element_type = enumerable.element_type;
             this.category = category;
             this.category = category;
             var source_info = source.get_info();
             var source_info = source.get_info();
-            this.sources = single(source_info);
-            this.ultimate_sources = source_info.sources.any() ? source_info.ultimate_sources : single(source_info);
+            this.sources = Iterate.single(source_info);
+            this.ultimate_sources = source_info.sources.any() ? source_info.ultimate_sources : Iterate.single(source_info);
         }
         }
 
 
         public EnumerableInfo.infer_ultimate(Enumerable enumerable, EnumerableCategory category) {
         public EnumerableInfo.infer_ultimate(Enumerable enumerable, EnumerableCategory category) {
@@ -45,7 +45,7 @@ namespace Invercargill {
             this.enumerable_type = enumerable.get_type();
             this.enumerable_type = enumerable.get_type();
             this.element_type = enumerable.element_type;
             this.element_type = enumerable.element_type;
             this.category = category;
             this.category = category;
-            this.sources = empty<EnumerableInfo>();
+            this.sources = Iterate.nothing<EnumerableInfo>();
             this.ultimate_sources = this.sources;
             this.ultimate_sources = this.sources;
         }
         }
 
 

+ 1 - 1
src/lib/Interfaces/BinaryData.vala

@@ -7,7 +7,7 @@ namespace Invercargill {
         public virtual string to_raw_string(bool null_terminate = true) {
         public virtual string to_raw_string(bool null_terminate = true) {
             Enumerable<uint8> data = this;
             Enumerable<uint8> data = this;
             if(null_terminate) {
             if(null_terminate) {
-                data.concat(Invercargill.single<uint8>(0));
+                data.concat(Iterate.single<uint8>(0));
             }
             }
             return (string)data.to_array();
             return (string)data.to_array();
         }
         }

+ 0 - 40
src/lib/Invercargill.vala

@@ -1,40 +0,0 @@
-
-namespace Invercargill {
-
-    public static Enumerable<int> range(int from, int to, int increment = 1) {
-        return new Generators.Range(from, to, increment);
-    }
-
-    public static Enumerable<T> empty<T>() {
-        return new Generators.Empty<T>();
-    }
-
-    public static Enumerable<T> single<T>(T item) {
-        var seq = new Invercargill.DataStructures.Series<T>();
-        seq.add(item);
-        return seq;
-    }
-
-    public static TransformDelegate<TIn, TOut> trycatch<TIn, TOut>(ErrorThrowingDelegate<TIn, TOut> main, ErrorCatchingDelegate<TIn, TOut> handler) {
-        return (i) => {
-            try {
-                return main(i);
-            }
-            catch(Error e) {
-                return handler(i, e);
-            }
-        };
-    }
-
-    public static TransformDelegate<TIn, TOut> trydefault<TIn, TOut>(ErrorThrowingDelegate<TIn, TOut> func, TOut default_value) {
-        return (i) => {
-            try {
-                return func(i);
-            }
-            catch {
-                return default_value;
-            }
-        };
-    }
-
-}

+ 2 - 2
src/lib/Promotions/Attempts.vala

@@ -141,7 +141,7 @@ namespace Invercargill {
         }
         }
     
     
         public new Attempts<TOut> select_many<TOut>(owned TransformDelegate<T, Enumerable<TOut>> transform) {
         public new Attempts<TOut> select_many<TOut>(owned TransformDelegate<T, Enumerable<TOut>> transform) {
-            return inner.select_many<Attempt<TOut>>(a => a.success ? transform(a.result).select<Attempt<TOut>>(i => new Attempt<TOut>.successful(i)) : Invercargill.single<Attempt<TOut>>(new Attempt<TOut>.unsuccessful(a.error))).assert_promotion<Attempts<T>>();
+            return inner.select_many<Attempt<TOut>>(a => a.success ? transform(a.result).select<Attempt<TOut>>(i => new Attempt<TOut>.successful(i)) : Iterate.single<Attempt<TOut>>(new Attempt<TOut>.unsuccessful(a.error))).assert_promotion<Attempts<T>>();
         }
         }
     
     
         public new Attempts<T> concat(Enumerable<Attempt<T>> other) {
         public new Attempts<T> concat(Enumerable<Attempt<T>> other) {
@@ -229,7 +229,7 @@ namespace Invercargill {
         public new Attempts<TOut> attempt_select_nested<TOut>(owned AttemptTransformDelegate<T, Enumerable<Attempt<TOut>>> transform) {
         public new Attempts<TOut> attempt_select_nested<TOut>(owned AttemptTransformDelegate<T, Enumerable<Attempt<TOut>>> transform) {
             return attempt_select<Enumerable<Attempt<TOut>>>((owned)transform)
             return attempt_select<Enumerable<Attempt<TOut>>>((owned)transform)
                 .as_enumerable()
                 .as_enumerable()
-                .select_many<Attempt<TOut>>(a => a.success ? a.result : Invercargill.single<Attempt<TOut>>(new Attempt<TOut>.unsuccessful(a.error)))
+                .select_many<Attempt<TOut>>(a => a.success ? a.result : Iterate.single<Attempt<TOut>>(new Attempt<TOut>.unsuccessful(a.error)))
                 .assert_promotion<Attempts<TOut>>();
                 .assert_promotion<Attempts<TOut>>();
         }
         }
 
 

+ 0 - 36
src/lib/Wrappers/GeeIterable.vala

@@ -1,36 +0,0 @@
-
-using Gee;
-
-namespace Invercargill.Wrappers {
-
-    private class GeeIterable<T> : Enumerable<T> {
-
-        private Iterable<T> iterable;
-
-        public GeeIterable(Iterable<T> gee) {
-            iterable = gee;
-        }
-
-        public override uint? peek_count() {
-            return null;
-        }
-
-        public override EnumerableInfo get_info() {
-            return new EnumerableInfo.infer_ultimate (this, EnumerableCategory.COMPUTED);
-        }
-
-        
-        public override Tracker<T> get_tracker() {
-            var iterator = iterable.iterator();
-
-            return new LambdaTracker<T>(
-                () => iterator.has_next(),
-                () => {
-                    iterator.next();
-                    return iterator.get();
-                });
-        }
-
-    }
-
-}

+ 9 - 8
src/lib/meson.build

@@ -1,12 +1,13 @@
-add_project_arguments('-DFUSE_USE_VERSION=26', language: 'c')
+
+# Library version
+invercargill_version = '0.1'
 
 
 dependencies = [
 dependencies = [
     dependency('glib-2.0'),
     dependency('glib-2.0'),
     dependency('gobject-2.0'),
     dependency('gobject-2.0'),
 ]
 ]
 
 
-sources = files('Invercargill.vala')
-sources += files('Enumerable.vala')
+sources = files('Enumerable.vala')
 sources += files('Delegates.vala')
 sources += files('Delegates.vala')
 sources += files('Pair.vala')
 sources += files('Pair.vala')
 sources += files('PositionItemPair.vala')
 sources += files('PositionItemPair.vala')
@@ -127,22 +128,22 @@ sources += files('Operators/Equality.vala')
 sources += files('Operators/Hash.vala')
 sources += files('Operators/Hash.vala')
 sources += files('Operators/Stringify.vala')
 sources += files('Operators/Stringify.vala')
 
 
-invercargill = shared_library('invercargill', sources,
+invercargill = shared_library('invercargill-@0@'.format(invercargill_version), sources,
     dependencies: dependencies,
     dependencies: dependencies,
     install: true,
     install: true,
-    vala_gir: 'invercargill-1.0.gir',
+    vala_gir: 'invercargill-@0@.gir'.format(invercargill_version),
     install_dir: [true, true, true, true]
     install_dir: [true, true, true, true]
 )
 )
 invercargill_dep = declare_dependency(link_with: invercargill, include_directories: include_directories('.'))
 invercargill_dep = declare_dependency(link_with: invercargill, include_directories: include_directories('.'))
 
 
 pkg = import('pkgconfig')
 pkg = import('pkgconfig')
 pkg.generate(invercargill,
 pkg.generate(invercargill,
-    version : '0.1',
+    version : invercargill_version,
     name : 'invercargill',)
     name : 'invercargill',)
     
     
 g_ir_compiler = find_program('g-ir-compiler')
 g_ir_compiler = find_program('g-ir-compiler')
-custom_target('invercargill typelib', command: [g_ir_compiler, '--shared-library=libinvercargill.so', '--output', '@OUTPUT@', meson.current_build_dir() / 'invercargill-1.0.gir'],
-              output: 'invercargill-1.0.typelib',
+custom_target('invercargill typelib', command: [g_ir_compiler, '--shared-library=libinvercargill-@0@.so'.format(invercargill_version), '--output', '@OUTPUT@', meson.current_build_dir() / 'invercargill-@0@.gir'.format(invercargill_version)],
+              output: 'invercargill-@0@.typelib'.format(invercargill_version),
               depends: invercargill,
               depends: invercargill,
               install: true,
               install: true,
               install_dir: get_option('libdir') / 'girepository-1.0')
               install_dir: get_option('libdir') / 'girepository-1.0')

+ 2 - 2
src/tests/Integration/Arrays.vala

@@ -14,7 +14,7 @@ void array_tests() {
 
 
     Test.add_func("/invercargill/function/to_array/many", () => {
     Test.add_func("/invercargill/function/to_array/many", () => {
         var num = 10000000;
         var num = 10000000;
-        var array = range(0, num).to_array();
+        var array = Iterate.range(0, num).to_array();
 
 
         for(int i = 0; i < num; i++) {
         for(int i = 0; i < num; i++) {
             assert(array[i] == i);
             assert(array[i] == i);
@@ -23,7 +23,7 @@ void array_tests() {
 
 
     Test.add_func("/invercargill/convert/from_array", () => {
     Test.add_func("/invercargill/convert/from_array", () => {
         var num = 10000000;
         var num = 10000000;
-        var array = range(0, num).to_array();
+        var array = Iterate.range(0, num).to_array();
 
 
         var enumerable = Wrap.array(array);
         var enumerable = Wrap.array(array);
         assert_true(enumerable.count() == num);
         assert_true(enumerable.count() == num);

+ 2 - 2
src/tests/Integration/ByteComposition.vala

@@ -5,8 +5,8 @@ void byte_composition_tests() {
 
 
     Test.add_func("/invercargill/structure/byte_composition/read_in", () => {
     Test.add_func("/invercargill/structure/byte_composition/read_in", () => {
 
 
-        var large_p1 = new Bytes(range(0, 500000, 1).select<uint8>(i => (uint8)i).to_array());
-        var large_p2 = new Bytes(range(0, 500000, 1).select<uint8>(i => (uint8)i).to_array());
+        var large_p1 = new Bytes(Iterate.range(0, 500000, 1).select<uint8>(i => (uint8)i).to_array());
+        var large_p2 = new Bytes(Iterate.range(0, 500000, 1).select<uint8>(i => (uint8)i).to_array());
 
 
         var data = new ByteComposition();
         var data = new ByteComposition();
         size_t to_read = 1000000;
         size_t to_read = 1000000;

+ 2 - 2
src/tests/Integration/Cache.vala

@@ -5,7 +5,7 @@ void cache_tests() {
 
 
     Test.add_func("/invercargill/operator/cache", () => {
     Test.add_func("/invercargill/operator/cache", () => {
         var runs = 0;
         var runs = 0;
-        var enumerable = range(0, 64)
+        var enumerable = Iterate.range(0, 64)
             .assert_promotion<SignedNativeIntegers>()
             .assert_promotion<SignedNativeIntegers>()
             .act(() => runs++)
             .act(() => runs++)
             .cache();
             .cache();
@@ -28,7 +28,7 @@ void cache_tests() {
         var runs = 0;
         var runs = 0;
         CachedGet<int> func = () => once<int>(() => ++runs);
         CachedGet<int> func = () => once<int>(() => ++runs);
 
 
-        var enumerable = range(0, 64).select<int>(i => func()).to_vector();
+        var enumerable = Iterate.range(0, 64).select<int>(i => func()).to_vector();
         
         
         assert_cmpint(1, CompareOperator.EQ, runs);
         assert_cmpint(1, CompareOperator.EQ, runs);
         assert_true(enumerable.all(i => i == 1));
         assert_true(enumerable.all(i => i == 1));

+ 3 - 3
src/tests/Integration/EnumerableMethods.vala

@@ -100,7 +100,7 @@ void enumerable_methods_tests() {
     });
     });
 
 
     Test.add_func("/invercargill/enumerable/long_count", () => {
     Test.add_func("/invercargill/enumerable/long_count", () => {
-        var items = range(0, 1000000);
+        var items = Iterate.range(0, 1000000);
         assert(items.count_ulong() == 1000000);
         assert(items.count_ulong() == 1000000);
     });
     });
 
 
@@ -605,7 +605,7 @@ void enumerable_methods_tests() {
 
 
     Test.add_func("/invercargill/enumerable/fork_many", () => {
     Test.add_func("/invercargill/enumerable/fork_many", () => {
         var items = Wrap.array(new int[] { 1, 2 });
         var items = Wrap.array(new int[] { 1, 2 });
-        var result = items.fork_many<int>(i => range(0, i), i => range(0, i * 2)).to_array();
+        var result = items.fork_many<int>(i => Iterate.range(0, i), i => Iterate.range(0, i * 2)).to_array();
         var expected = new int[] { 0, 0, 1, 0, 1, 0, 1, 2, 3 };
         var expected = new int[] { 0, 0, 1, 0, 1, 0, 1, 2, 3 };
         assert(result.length == expected.length);
         assert(result.length == expected.length);
         for (int i = 0; i < expected.length; i++) {
         for (int i = 0; i < expected.length; i++) {
@@ -669,7 +669,7 @@ void enumerable_methods_tests() {
     });
     });
 
 
     Test.add_func("/invercargill/enumerable/cache", () => {
     Test.add_func("/invercargill/enumerable/cache", () => {
-        var items = Iterate.deferred<int>(() => range(0, 3));
+        var items = Iterate.deferred<int>(() => Iterate.range(0, 3));
         var cached = items.cache();
         var cached = items.cache();
         var result1 = cached.to_array();
         var result1 = cached.to_array();
         var result2 = cached.to_array();
         var result2 = cached.to_array();

+ 1 - 1
src/tests/Integration/Numbers.vala

@@ -6,7 +6,7 @@ void numbers_test() {
 
 
     Test.add_func("/invercargill/numbers/average", () => {
     Test.add_func("/invercargill/numbers/average", () => {
 
 
-        var data = range(1, 60, 1).select<double?>(i => (double?)i);
+        var data = Iterate.range(1, 60, 1).select<double?>(i => (double?)i);
         var numbers = data.assert_promotion<Doubles>();
         var numbers = data.assert_promotion<Doubles>();
         var average = numbers.average();
         var average = numbers.average();
 
 

+ 1 - 1
src/tests/Integration/Parallel.vala

@@ -58,7 +58,7 @@ void parallel_tests() {
     });
     });
 
 
     Test.add_func("/invercargill/operator/parallel/bulk", () => {
     Test.add_func("/invercargill/operator/parallel/bulk", () => {
-        var numbers = range(0, 1000000, 2);
+        var numbers = Iterate.range(0, 1000000, 2);
 
 
         var result = numbers.parallel_select<int>(i => i + 1, 4);
         var result = numbers.parallel_select<int>(i => i + 1, 4);
         assert_true(result.no(i => i % 2 == 0));
         assert_true(result.no(i => i % 2 == 0));

+ 1 - 1
src/tests/Integration/Promotion.vala

@@ -26,7 +26,7 @@ void promotion_tests() {
 
 
     Test.add_func("/invercargill/promotions/sticky", () => { 
     Test.add_func("/invercargill/promotions/sticky", () => { 
         try {
         try {
-            var sum = range(0, 10000, 1)
+            var sum = Iterate.range(0, 10000, 1)
                 .promote_to<Signed32BitIntegers>()
                 .promote_to<Signed32BitIntegers>()
                 .where(i => i % 2 != 0)
                 .where(i => i % 2 != 0)
                 .sum();
                 .sum();

+ 2 - 2
src/tests/Integration/RemainingComponents.vala

@@ -6,7 +6,7 @@ void remaining_components_tests() {
     Test.add_func("/invercargill/generators/deferred/simple", () => {
     Test.add_func("/invercargill/generators/deferred/simple", () => {
         var counter = 0;
         var counter = 0;
         var deferred = Iterate.deferred<int>(() => {
         var deferred = Iterate.deferred<int>(() => {
-            return range(counter, counter + 3);
+            return Iterate.range(counter, counter + 3);
         });
         });
         
         
         var result1 = deferred.to_array();
         var result1 = deferred.to_array();
@@ -184,7 +184,7 @@ void remaining_components_tests() {
         var counter = 0;
         var counter = 0;
         var items = Iterate.deferred<int>(() => {
         var items = Iterate.deferred<int>(() => {
             counter++;
             counter++;
-            return range(0, 3);
+            return Iterate.range(0, 3);
         });
         });
         
         
         var cached = items.cache();
         var cached = items.cache();

+ 1 - 1
src/tests/Integration/Series.vala

@@ -14,7 +14,7 @@ void series_tests() {
 
 
     Test.add_func("/invercargill/structure/series/many_items", () => {
     Test.add_func("/invercargill/structure/series/many_items", () => {
 
 
-        var items = range(0, 10000000);
+        var items = Iterate.range(0, 10000000);
         var series = items.to_series();
         var series = items.to_series();
         assert(series.count() == 10000000);
         assert(series.count() == 10000000);
 
 

+ 2 - 2
src/tests/Integration/Set.vala

@@ -14,7 +14,7 @@ void set_tests() {
 
 
     Test.add_func("/invercargill/structure/hash_set/add_many", () => {
     Test.add_func("/invercargill/structure/hash_set/add_many", () => {
 
 
-        var items = range(0, 10000000);
+        var items = Iterate.range(0, 10000000);
         var hashset = items.to_hash_set();
         var hashset = items.to_hash_set();
         assert_cmpuint(hashset.count(), CompareOperator.EQ, 10000000);
         assert_cmpuint(hashset.count(), CompareOperator.EQ, 10000000);
         assert_true(hashset.equals(items));
         assert_true(hashset.equals(items));
@@ -23,7 +23,7 @@ void set_tests() {
     Test.add_func("/invercargill/structure/hash_set/de_duplicates", () => {
     Test.add_func("/invercargill/structure/hash_set/de_duplicates", () => {
 
 
         var series = new HashSet<int>();
         var series = new HashSet<int>();
-        var items = range(0, 100);
+        var items = Iterate.range(0, 100);
         series.union_with(items);
         series.union_with(items);
         series.union_with(items);
         series.union_with(items);
         assert_cmpuint(series.count(), CompareOperator.EQ, 100);
         assert_cmpuint(series.count(), CompareOperator.EQ, 100);

+ 7 - 7
src/tests/Integration/SortedSeries.vala

@@ -15,7 +15,7 @@ void sorted_series_tests() {
     Test.add_func("/invercargill/structure/sorted_series/add_many", () => {
     Test.add_func("/invercargill/structure/sorted_series/add_many", () => {
 
 
         var series = new SortedSeries<int>();
         var series = new SortedSeries<int>();
-        var items = range(0, 10000000);
+        var items = Iterate.range(0, 10000000);
         series.add_all(items);
         series.add_all(items);
         assert_cmpuint(series.count(), CompareOperator.EQ, 10000000);
         assert_cmpuint(series.count(), CompareOperator.EQ, 10000000);
 
 
@@ -25,7 +25,7 @@ void sorted_series_tests() {
     Test.add_func("/invercargill/structure/sorted_series/add_many_reversed", () => {
     Test.add_func("/invercargill/structure/sorted_series/add_many_reversed", () => {
 
 
         var series = new SortedSeries<int>();
         var series = new SortedSeries<int>();
-        var items = range(10000000, 0, -1);
+        var items = Iterate.range(10000000, 0, -1);
         series.add_all(items);
         series.add_all(items);
         assert_cmpuint(series.count(), CompareOperator.EQ, 10000000);
         assert_cmpuint(series.count(), CompareOperator.EQ, 10000000);
     });
     });
@@ -33,7 +33,7 @@ void sorted_series_tests() {
     Test.add_func("/invercargill/structure/sorted_series/add_twice", () => {
     Test.add_func("/invercargill/structure/sorted_series/add_twice", () => {
 
 
         var series = new SortedSeries<int>();
         var series = new SortedSeries<int>();
-        var items = range(0, 100);
+        var items = Iterate.range(0, 100);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         assert_cmpuint(series.count(), CompareOperator.EQ, 200);
         assert_cmpuint(series.count(), CompareOperator.EQ, 200);
@@ -44,7 +44,7 @@ void sorted_series_tests() {
     Test.add_func("/invercargill/structure/sorted_series/remove_first_where", () => {
     Test.add_func("/invercargill/structure/sorted_series/remove_first_where", () => {
 
 
         var series = new SortedSeries<int>();
         var series = new SortedSeries<int>();
-        var items = range(0, 100);
+        var items = Iterate.range(0, 100);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         items.iterate(i => series.remove_first_where(si => si == i));
         items.iterate(i => series.remove_first_where(si => si == i));
@@ -55,18 +55,18 @@ void sorted_series_tests() {
     Test.add_func("/invercargill/structure/sorted_series/remove_all_where", () => {
     Test.add_func("/invercargill/structure/sorted_series/remove_all_where", () => {
 
 
         var series = new SortedSeries<int>();
         var series = new SortedSeries<int>();
-        var items = range(0, 100);
+        var items = Iterate.range(0, 100);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         series.remove_all_where(si => si < 50);
         series.remove_all_where(si => si < 50);
         assert_cmpuint(series.count(), CompareOperator.EQ, 100);
         assert_cmpuint(series.count(), CompareOperator.EQ, 100);
-        assert_true(range(50, 100).interleave(range(50, 100)).matches(series, (a, b) => a == b));
+        assert_true(Iterate.range(50, 100).interleave(Iterate.range(50, 100)).matches(series, (a, b) => a == b));
     });
     });
 
 
     Test.add_func("/invercargill/structure/sorted_series/clear", () => {
     Test.add_func("/invercargill/structure/sorted_series/clear", () => {
 
 
         var series = new SortedSeries<int>();
         var series = new SortedSeries<int>();
-        var items = range(0, 100);
+        var items = Iterate.range(0, 100);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         series.clear();
         series.clear();

+ 3 - 3
src/tests/Integration/SortedVector.vala

@@ -15,7 +15,7 @@ void sorted_vector_tests() {
     Test.add_func("/invercargill/structure/sorted_vector/add_many", () => {
     Test.add_func("/invercargill/structure/sorted_vector/add_many", () => {
 
 
         var series = new SortedVector<int>();
         var series = new SortedVector<int>();
-        var items = range(0, 10000000);
+        var items = Iterate.range(0, 10000000);
         series.add_all(items);
         series.add_all(items);
         assert(series.count() == 10000000);
         assert(series.count() == 10000000);
         assert(series.matches(items, (a, b) => a == b));
         assert(series.matches(items, (a, b) => a == b));
@@ -24,7 +24,7 @@ void sorted_vector_tests() {
     Test.add_func("/invercargill/structure/sorted_vector/add_many_reversed", () => {
     Test.add_func("/invercargill/structure/sorted_vector/add_many_reversed", () => {
 
 
         var series = new SortedVector<int>();
         var series = new SortedVector<int>();
-        var items = range(300000, 0, -1);
+        var items = Iterate.range(300000, 0, -1);
         series.add_all(items);
         series.add_all(items);
         assert(series.count() == 300000);
         assert(series.count() == 300000);
 
 
@@ -33,7 +33,7 @@ void sorted_vector_tests() {
     Test.add_func("/invercargill/structure/sorted_vector/add_twice", () => {
     Test.add_func("/invercargill/structure/sorted_vector/add_twice", () => {
 
 
         var series = new SortedVector<int>();
         var series = new SortedVector<int>();
-        var items = range(0, 100);
+        var items = Iterate.range(0, 100);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         series.add_all(items);
         assert(series.count() == 200);
         assert(series.count() == 200);

+ 2 - 2
src/tests/Integration/Tracker.vala

@@ -13,7 +13,7 @@ void tracker_tests() {
     });
     });
 
 
     Test.add_func("/invercargill/enumerable/iterator2", () => {
     Test.add_func("/invercargill/enumerable/iterator2", () => {
-        var items = range(10, 1000, 5);
+        var items = Iterate.range(10, 1000, 5);
 
 
         var i = 10;
         var i = 10;
         foreach (var item in items) {
         foreach (var item in items) {
@@ -23,7 +23,7 @@ void tracker_tests() {
     });
     });
 
 
     Test.add_func("/invercargill/enumerable/iterator3", () => {
     Test.add_func("/invercargill/enumerable/iterator3", () => {
-        var items = range(0, 1000);
+        var items = Iterate.range(0, 1000);
 
 
         var i = 0;
         var i = 0;
         foreach (var item in items) {
         foreach (var item in items) {

+ 2 - 2
src/tests/Integration/Vector.vala

@@ -27,7 +27,7 @@ void vector_tests() {
 
 
     Test.add_func("/invercargill/structure/vector/from_attempts", () => {
     Test.add_func("/invercargill/structure/vector/from_attempts", () => {
 
 
-        var vector = range(0,64).select<Attempt<int>>(i => new Attempt<int>(() => i+2)).to_vector();
+        var vector = Iterate.range(0,64).select<Attempt<int>>(i => new Attempt<int>(() => i+2)).to_vector();
 
 
         assert(vector.first_or_default().success);
         assert(vector.first_or_default().success);
         assert(vector.get_or_default(1).success);
         assert(vector.get_or_default(1).success);
@@ -95,7 +95,7 @@ void vector_tests() {
 
 
     Test.add_func("/invercargill/structure/vector/many_items", () => {
     Test.add_func("/invercargill/structure/vector/many_items", () => {
 
 
-        var items = range(0, 10000000);
+        var items = Iterate.range(0, 10000000);
         var vector = items.to_vector();
         var vector = items.to_vector();
         assert(vector.count() == 10000000);
         assert(vector.count() == 10000000);
 
 

+ 2 - 2
src/tests/Speed/SpeedTest.vala

@@ -10,14 +10,14 @@ void speed_test_runner_int(string type_name, Enumerable<int> e, AddDelegate<int>
 
 
     int individual_writes = 10000000;
     int individual_writes = 10000000;
     run_speed_test(@"$individual_writes individual writes", () => {
     run_speed_test(@"$individual_writes individual writes", () => {
-        range(0, individual_writes).iterate(i => add(i));
+        Iterate.range(0, individual_writes).iterate(i => add(i));
     });
     });
 
 
 
 
     int bulk_writes = 10000;
     int bulk_writes = 10000;
     int batch_size = 1000;
     int batch_size = 1000;
     run_speed_test(@"$bulk_writes bulk writes of $batch_size items", () => {
     run_speed_test(@"$bulk_writes bulk writes of $batch_size items", () => {
-        range(0, bulk_writes).iterate(i => bulk(range(0, batch_size)));
+        Iterate.range(0, bulk_writes).iterate(i => bulk(Iterate.range(0, batch_size)));
     });
     });