diff options
| author | 2024-12-28 21:27:24 -0500 | |
|---|---|---|
| committer | 2024-12-28 21:27:24 -0500 | |
| commit | e9c8de093bac0697c41a9e01542163de1d6cbb1c (patch) | |
| tree | 8ec23ce11a7500bec4ebdc2890ed8284fc7b9ae5 /mcgoron.iterator.exceptions.sld | |
| parent | refactor 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.exceptions.sld')
| -rw-r--r-- | mcgoron.iterator.exceptions.sld | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mcgoron.iterator.exceptions.sld b/mcgoron.iterator.exceptions.sld index ce1b8db..0140f4c 100644 --- a/mcgoron.iterator.exceptions.sld +++ b/mcgoron.iterator.exceptions.sld @@ -24,7 +24,11 @@ negative-movement-exception:spaces improper-list-exception improper-list-exception? improper-list-exception:idx - improper-list-exception:cdr) + improper-list-exception:cdr + not-implemented-exception + not-implemented-exception? + not-implemented-exception:type + not-implemented-exception:args) (begin (define-record-type <field-not-found-exception> (field-not-found-exception field iterator) @@ -43,5 +47,10 @@ (improper-list-exception idx cdr) improper-list-exception? (idx improper-list-exception:idx) - (cdr improper-list-exception:cdr)))) + (cdr improper-list-exception:cdr)) + (define-record-type <not-implemented-exception> + (not-implemented-exception type args) + not-implemented-exception? + (type not-implemented-exception:type) + (args not-implemented-exception:args)))) |
