O'Reilly logo

Clojure Programming Cookbook by Nicolas Modrzyk, Makoto Hashimoto

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Logic programming in Clojure

 

"Logic will get you from A to B. Imagination will take you everywhere."

 
 --Albert Einstein

This recipe is going to be a hell of a ride recipe. Strap yourself in. Get a shot of tequila. This is hardcore. So many fun things to learn! But first, what is logic programming? In one sentence, I would say:

Logic programming is a technique that enables you to find goals, given a set of statements or facts.

Again, this is the author's way of presenting logic programming. There is much more academic language being used on the Internet if you are interested. Anyway. What does that mean in easy-to-read terms? Let's see an example.

Say you want to find all the solutions where x is not equal to 2, and x is in the list (1 2 3). Or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required