Our high school teacher tried teaching a beginners CS class Prolog. He failed. I remember being able to solve all the assignments but still having no clue about what this language does. When Prolog came up in my grad school AI class, I was forced to look at it again and finally grasped many of the underlying concepts.