Two books that did for me what I think you are looking for: - From Mathematics to Generic Programming by Stepanov & Rose - Gödel, Escher, Bach: an Eternal Golden Braid by Hofstadter - The Little Schemer / The Seasoned Schemer
Also recommended in this reply