r/functionalprogramming • • Jun 29 '21

Python good examples of functional-like python code that one can study?

Would love to be able to study some real world python code that is written in functional style. Have not come across any. They must exist out there given the interest in functional and interest in python.

Thank you for sharing.

16 Upvotes

25 comments sorted by

View all comments

Show parent comment

2

u/kluvin Jul 01 '21

I have done most of the referenced course. Planning to get back and really do the compiler parts, as making compilers is the main thing OCaml is good at:

  • Facebook's Haxe is built with that.
  • Rust was originally built in OCaml before it was bootstrapped
  • Facebook's Flow type annotations for JS is implemented in OCaml

It is also great for writing mission-critical software:

  • Jane Street is using it for their trading
  • Bloomberg uses it internally
  • Indeed, pretty much anywhere when you want the benefit of the type-checker to tell you if your program is sound.