Whenever a newish programmer has asked me what language they should learn next I always say prolog. I fully expect them to never touch the language afterwards, but writing prolog was a truly a mind opening experience. More so than learning functional programming imo.