Prolog et al is a real brain buster. As in it will break your spirits and build you back up better.
I remember in college I was able to build a binary tree with 3 lines of code. And once you write the insert, the delete, search, and others just magically appear.
It also frames your thinking about defining what you want rather than how to get it.
If you really want to see the power of these kinds of languages look up Einstein's puzzle solved with prolog. The solution just magically comes out by entering the constraints of the puzzle.