aboutsummaryrefslogtreecommitdiffstats
path: root/mcgoron.iterator.srfi.128.sld
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2024-12-28 21:27:24 -0500
committerGravatar Peter McGoron 2024-12-28 21:27:24 -0500
commite9c8de093bac0697c41a9e01542163de1d6cbb1c (patch)
tree8ec23ce11a7500bec4ebdc2890ed8284fc7b9ae5 /mcgoron.iterator.srfi.128.sld
parentrefactor tests, add working code for list (diff)
refactor iterators to be closure objects
This makes iterators much more flexible while keeping their abstract nature. New iterators can be made by a programmer with different methods. Existing iterator types cannot be programatically extended. This would likely require implementation support: either CLOS-style classes or a more limited single-dispatch interface system.
Diffstat (limited to 'mcgoron.iterator.srfi.128.sld')
-rw-r--r--mcgoron.iterator.srfi.128.sld24
1 files changed, 24 insertions, 0 deletions
diff --git a/mcgoron.iterator.srfi.128.sld b/mcgoron.iterator.srfi.128.sld
new file mode 100644
index 0000000..712414c
--- /dev/null
+++ b/mcgoron.iterator.srfi.128.sld
@@ -0,0 +1,24 @@
+#| Copyright 2024 Peter McGoron
+ |
+ | Licensed under the Apache License, Version 2.0 (the "License");
+ | you may not use this file except in compliance with the License.
+ | You may obtain a copy of the License at
+ |
+ | http://www.apache.org/licenses/LICENSE-2.0
+ |
+ | Unless required by applicable law or agreed to in writing, software
+ | distributed under the License is distributed on an "AS IS" BASIS,
+ | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ | See the License for the specific language governing permissions and
+ | limitations under the License.
+ |#
+
+(define-library (mcgoron iterator srfi 128)
+ (import (scheme base) (srfi 128)
+ (mcgoron iterator base))
+ (export get-iterator-comparator
+ iterator=?
+ iterator<? iterator<=?
+ iterator>? iterator>=?)
+ (include "mcgoron.iterator.srfi.128.scm"))
+