Skip to content

Latest commit

 

History

History
4 lines (4 loc) · 794 Bytes

README.md

File metadata and controls

4 lines (4 loc) · 794 Bytes

Haskulator

Simple 5 function calculator (with 2 unary operators) [also the calculator can be extended to use ANY binary or unary operator]! I originally wrote a calculator in Scala, with a LOT of work and complication behind things, and so I thought to try writing one in Haskell to see if it would be any easier with a more functional mindset ingrained in my head. To my surprise, it was! I think the biggest difference between my two philosophies while using the different languages is that when I wrote in Scala, for some reason, I only let myself parse character by character. With Haskell, however, I had seen some examples use tokens and parsing token by token was MUCH simpler than parsing character by character. Who knows, with this done, a rudimentary compiler might not be too bad!