Let's separate for a minute the problem of writing functional code for a practical purpose, and teaching yourself functional programming in principle. Java and C++ are very ugly languages for this purpose, and like I mentioned in my last post, top institutions like CMU have been using Ocaml for years. "A language that doesn't affect the way you think about programming, is not worth knowing." --Alan Perlis.
There are also other options if you are just doing stuff at home. Sure Haskell is one, but it can get way too clever for its own good real fast. I already mentioned the ML family of languages. But I shouldn't be remiss and fail to mention Scheme, which is pretty much the ultimate functional language in the sense that it is basically a Lisp that was designed to be functional from the ground up, and defined in a
beautiful document by its very smart authors that describes the entire language and is updated every decade or so. Also, ML is very closely related to Scheme in terms of its execution model, but adds in a static type system, so your skills in Scheme can transfer to ML.
Oh, and by the way, Javascript (for all its warts and pathetic type system) is also based on Scheme. So if you know Scheme, you already understand what the functional bits of Javascript are.
The classic source for learning Scheme is the (in?)famous book affectionately known as
SICP. Actually, Gerald Sussman is both a coauthor of the Scheme language itself, and of SICP. Of course, the book is a little strange, because, just like Michael Artin supposedly wrote his widely assigned Algebra book based on his course at that oh-so-legendary institution MIT for undergraduates who, being too junior to have actually learned linear algebra by their freshman year, nevertheless were being taught an abstract algebra course that covered linear algebra along the way, likewise, SICP is another creation of MIT pedagogy which assumes that the reader doesn't really know much about programming at all, but in doing so actually tries to teach the student more about writing very fancy things like meta-circular interpreters, generics, and compilers along the way.
Another cool book that teaches functional programming, but not using Scheme (the author uses mathematical notation and most of the code in the book corresponds to things from Common Lisp), is the book Functional Programming: Practice and Theory by Bruce J. Maclennan, which is pretty much as close as you are going to get in looking for a book about programming that also feels like math prose (and not computer science, where the metaphor the author usually assumes of the reader is some kind of mechanical automaton that enters commands into a machine without thinking) and
also legitimately tells you WTF is going on (you get to learn about fancy things like fixed-point combinators and then seeing what they are practical for). For a modern take on Common Lisp, see the functional programming language Clojure, although Common Lisp itself in the form of sbcl and Emacs SLIME is an excellent development environment, so long as you assume that you will essentially never, ever use it in an industrial setting, because basically nobody does except as lone wolf programmers (although there is an active community which writes tons of code and there are plenty of libraries out there).
In fact, when you hear about things like map and reduce in functional programming, those actually are functions from Common Lisp. So even if you don't want to become a Common Lisp programmer, there are some rewards to learning it anyway.
For starters, you can read Paul Graham's
"The Roots of Lisp", which is a great place to understand the reasons why Lisp is a historically important language, and in particular when it comes to functional programming.