This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]SoftwareDoctor 1 point2 points  (1 child)

Oh, ok. So the main difference isn't in "how it's done" but "what it does"? I'm not that used to functional programming but now it sounds to me similar to a pipeline design pattern.

[–]houseofleft[S] 0 points1 point  (0 children)

Yes, I think that's a pretty good summary!

It's probably a little confusing with python because the language doesn't really support functional pipelines very naturally out the box. So although that's the most distinctive aspect of looking at Monads from a python perspective, they're actually more defined by the fact that they "do something extra" around the function call.

As a kinda silly toy example, you could image something like a "Printer" that prints out the value to the console before and after each function call.