I've uploaded a "scanner" abstraction system on arc-wiki.git A scanner is simply a perfect subset of lists: they have only two valid operations, car and cdr. indexing off a scanner is not supported; basically the scanner is just a moving pointer across whatever sequence you want to scan. A scanner does not support mutating the underlying data structure being scanned. I think the best use of scanners is if you want to specially structure strings. For example, your strings might really be a nested definition, however, you might want to use regular expressions to search for certain parts of the string. I probably should make the creation of scanner types much prettier, since I think the scanner abstraction can be quite useful. |