Skip to content

sasamil/RPN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 

Repository files navigation

RPN - Reverse Polish Notation

A simple program for converting algebraic expressions into the corresponding RPN forms. Yet another illustration of Haskell's power and potential, among many similar examples on internet.

I fell in love with Haskell. It might be because it's so different. It's totally lazy and due to the laziness - efficient! There is no program flow; there are neither classic loops nor classic variables!? But, there are weird things like infinite lists, aplicative functors, recursive type structures, mutual recursions, monoids, monads... Sounds crazy. crazy Looks so seductive! ( as for me - irresistibly seductive )

This method might be interesting (no stack) but it is certainly obsolete (please, see the more recent and better one). However, I was playing with this problem (using the same approach) about a year ago, trying both C++ and Python, and then I experienced much more difficulties. I can safely say that I payed considerably more efforts, at that time. Finally, there were more lines of less readable and more indistinct code. As for me, in regards to vague algorithms and complex decision making problems - thinking functionally is more suitable and more effective than thinking procedurally or thinking object oriented. I've got a winner, here! In my opinion, functionall programming has a future, and Haskell as its pure representive, deserves respect. It should be loved - it's likely to be mutual!

About

Reverse Polish Notation - Haskell approach

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published