Learn You a Haskell for Great Good! by Miran Lipovaca

Learn You a Haskell for Great Good! by Miran Lipovaca

Author:Miran Lipovaca
Language: eng
Format: mobi, epub, pdf
Tags: Reference:Computers
ISBN: 9781593272838
Publisher: No Starch Press
Published: 2011-04-01T00:00:00+00:00


Forget Haskell for a minute and think about how to solve the problem by hand. In the RPN calculator section, we first figured out that when calculating an expression by hand, we keep a sort of stack in our minds and then go over the expression one item at a time..

Think about how we’re going to represent our data in Haskell. For our RPN calculator, we decided to use a list of strings to represent our expression..

Figure out how to operate on that data in Haskell so that we produce a solution. For the calculator, we used a left fold to walk over the list of strings, while keeping a stack to produce a solution.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.