Book Image

Clojure Data Structures and Algorithms Cookbook

By : Rafik Naccache
Book Image

Clojure Data Structures and Algorithms Cookbook

By: Rafik Naccache

Overview of this book

Table of Contents (14 chapters)
Clojure Data Structures and Algorithms Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Introduction


Logic programming is an interesting paradigm according to which you can express programs in terms of relations that involve some logic variables and expect results that reflect what these logical variables have to be to make sure that these relations are verified. We then speak about "goals" that "succeed", as the logical engine was able to come up some particular configuration for the logical variables so these relations are verified.

This sort of programming, also known as relational programming – as it is about relations representing goals that have to succeed - lays the foundation of an alternative way of designing algorithms. Indeed, logical (or relational) programs are highly declarative; in this, you don't tell the computer how to compute a certain result for you. Instead, you specify the rules governing the relationships between your data, and based on those, you ask for some conclusions that would have been inferred by the knowledge that you just passed on to the logical...