How Do I Learn Some Functional Programming?
fse.guru
fse.guru
It covers all the fundamental abstractions found in functional programming, and the homework has some close-to-real-life examples that students must do.
5 stars.
Although, I agree with you: a Lisp (probably Racket or Scheme) is a much better bet for learning the functional style.
I write as much as I can in functional style even though I have to use VB.Net.
We have some Scala in my work environment. I had taken the course, read the book, and spent a little time writing some code, though as deadlines got tight, I would revert back to Java.
It wasn't until I forced myself to write everything in Scala that some of the idiomatic patterns started to make sense. For example, an export job was timing out due to numerous synchronous calls to external services. I rewrote it using async Futures with flatmap and collect, and it was much faster.
Even though I had read about Futures and their functional use a dozen different times, I realized I truly didn't understand them 'till I could apply them to a concrete problem I had. Also, Twitter puts out a lot of really good Scala stuff: Twitter school, Effective Scala, Finagle and Finatra, etc.
TLDR; read the books while writing some code.
It is certainly not "pure", but if you're coming from a procedural/OO world mindset, it's a fantastic bridge. That said, it doesn't cover some of the newer features of some modern FP languages, and won't necessarily directly apply to writing in Haskell or ML.
The problem I had with full on functional stuff was seeing what the point is - ok you could replace your for loop with some weird recursive stuff which the compiler will turn back to imperative behind the scenes so it will run quick but I had a trouble seeing why. However replacing some javascript loops with underscore stuff I was able to see how it was more compact and less bug prone. Also it doesn't take long to get.
https://archive.org/details/functional-programming-python
ps: once upon a time I stumbled upon a FP article in python dealing with designing (not applying known patterns) function call protocols to solve aritmethic problems. Asked on HN already but nobody could help. So just in case it rings someone else's bell .. feel free to reply.