If you like that, you should read Donald Knuth's "The Art of Computer Programming". It is full of very simple and powerful things that sometimes aren't obvious and will amaze you. It amazed me. I guess it's a textbook, but somehow I remember it more like a book of magic incantations.