From f55e03a8f9d2dd685314affc0d00d2aab66fca22 Mon Sep 17 00:00:00 2001 From: Magnus Landerblom Date: Tue, 1 Oct 2024 09:00:17 +0200 Subject: [PATCH] the patch also --- src/stdlib/iterator.cr | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/stdlib/iterator.cr diff --git a/src/stdlib/iterator.cr b/src/stdlib/iterator.cr new file mode 100644 index 0000000000..624cd46d96 --- /dev/null +++ b/src/stdlib/iterator.cr @@ -0,0 +1,13 @@ +module Iterator(T) + def self.empty + EmptyIterator(T).new + end + + private struct EmptyIterator(T) + include Iterator(T) + + def next + stop + end + end +end