sjl / temperance

A logic programming library for Common Lisp.
https://sjl.bitbucket.io/temperance
MIT License
58 stars 5 forks source link

Add `query-for` #14

Closed sjl closed 8 years ago

sjl commented 8 years ago

It's a giant pain in the ass to write (query-map t (lambda (r) (getf r '?what)) (foo ?what)). PAIProlog has a handy syntax that makes this nicer: (query-for t ?what (foo ?what)). We should steal this syntax.

Potentially this could be more efficient by not consing up the full list of results, but for now I'll just take the less shitty syntax and we can make it faster later.

sjl commented 8 years ago

Slow version is done