Editing Talk:1270: Functional
Please sign your posts with ~~~~ |
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
I feel like the examples should be in Haskall[sic], because that is the major functional language... [[Special:Contributions/67.160.98.42|67.160.98.42]] 09:48, 27 September 2013 (UTC) GBGamer117 | I feel like the examples should be in Haskall[sic], because that is the major functional language... [[Special:Contributions/67.160.98.42|67.160.98.42]] 09:48, 27 September 2013 (UTC) GBGamer117 | ||
β | :I think | + | :I think Hask'''e'''ll is more common, but I agree. And to emphasize the clarity, usually if/else blocks are avoided using pattern matching. I.e. tail-recursive factorial can be written as follows: |
fac2::Integer->Integer-> Integer -- optional function header | fac2::Integer->Integer-> Integer -- optional function header | ||
fac2 acc 0 = acc | fac2 acc 0 = acc |