I recently wrote a little library, chez-docs, to make accessing documentation easier while learning Chez Scheme (blog post). The main procedure, doc, in chez-docs only returns results for exact matches with proc.1 To aid in discovery, I’ve added a procedure, find-proc, that provides exact and approximate matching of search strings.
Levenshtein Distance My initial thought was that I should approach this problem with approximate string matching. After a little searching, I learned that Levenshtein distance was one of the simplest approaches to calculate the distance between two strings.
In the process of learning Chez Scheme, I’ve missed R’s ability to quickly pull up documentation from the console via help or ?. I’ve toyed with the idea of trying to format the contents of the Chez Scheme User’s Guide for display in the REPL (similar to Clojure Docs). But that is probably too big of a task for me at this point. It recently occurred to me, though, that I can write a simple library, chez-docs, with only one procedure, doc, that will make it a bit easier to access the Chez Scheme User’s Guide.