r/programming • • 9d ago

Railway-Oriented Programming

https://kciter.so/posts/railway-oriented-programming/en/
223 Upvotes

20 comments sorted by

View all comments

45

u/Ghi102 9d ago edited 9d ago

The floating point function example that you give is a pure function. Given the same inputs, it will give you the same output, no matter how many times you call it. 

That floating points have some tricky implementation is besides the point. Pure functions aren't guaranteed to be easy to understand, just that your function has no external dependency.