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!
-
Notifications
You must be signed in to change notification settings - Fork 0
4 Function Calculator, but in Haskell this time! (and waaaaaaaaaaay simpler!)
License
ddxtanx/haskulator
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
4 Function Calculator, but in Haskell this time! (and waaaaaaaaaaay simpler!)
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published