I've just uploaded a file that has the Mini-Kanren logic programming system described in "The Reasoned Schemer" implemented in idiomatic Clojure. The file is:
http://clojure.googlegroups.com/web/mini_kanren.clj I'm offering this as a candidate for inclusion into clojure.contrib. There are three parts in the file; implementation, utility functions and unit tests. The implementation part is not a port. Whatever similarities exist between this and the code from the book are a result of the nature of the problem. This implementation takes advantage of Clojure's hash- maps, lazy seqs and monad library. There are 10 or so basic utility functions that provide some foundational capabilities. The rest of the utility functions are lifted straight from the book and are used in the unit tests. The unit tests, are Mini-Kanren statements lifted from the book that verify the validity of the implementation. If this goes into clojure.contrib, I would suggest separating the implementation and 10 basic functions and make that part of clojure.contrib. The rest I would put in a test script or something. I'd appreciate anyone with experience with mini-kanren making any suggestions for improvements for style or performance. Jim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---