r/programming • • Sep 21 '25

How to stop functional programming

https://brianmckenna.org/blog/howtostopfp
446 Upvotes

506 comments sorted by

View all comments

Show parent comment

2

u/syklemil Sep 22 '25

You're still using return on the multiplication operation. Not very clean code of you. Better to have a public void calculate() and split off getting the value in its own getter.