Closed MaxEnglish closed 1 year ago
-Parser is yelling at me a lot and I'm not sure what's the matter with the code I have written there. -I remember you said that I'd only need to use resultOfStmts once per function, but I'm not sure how to do that so I just did what I was comfortable with. -I realize that you need an else stmt for every if-then-else in Haskell but for ifstmt and ifelif stmt I don't want an else. I believe that's why it's throwing an error for me. How can I circumvent this?
I'll post comments on the files themselves shortly, but I think I may not have explained clearly enough about resultOfStmts
. When I explained it early, it was in response to something you asked and I wanted to make sure that you didn't try to call the function twice (different from having it appear in the code twice). I did not mean that you would only write the function call once, but rather than it would only be called once. For example, consider
if test x then f y else f z
Here the function f
is called only once, even though it appears twice in the code.
-Parser is yelling at me a lot and I'm not sure what's the matter with the code I have written there. -I remember you said that I'd only need to use resultOfStmts once per function, but I'm not sure how to do that so I just did what I was comfortable with. -I realize that you need an else stmt for every if-then-else in Haskell but for ifstmt and ifelif stmt I don't want an else. I believe that's why it's throwing an error for me. How can I circumvent this?