The Reasoned Schemer by Daniel P. Friedman, William E. Byrd and Oleg Kiselyov
https://mitpress.mit.edu/books/reasoned-schemer
It's from the author of miniKanren on which LogicJS is based.
There are implementations for a lot of other languages (other JS implementation too) on