We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Quite easy to solve with variables in Haskell, but what exactly is the intended meaning of "cannot declare even local variables!" when applied to Haskell? Technically, in Haskell, every function is a variable containing a lambda expression, so this, taken literally, would mean that one can't write any functions. In particular, one can't write a main function, which automatically makes the task impossible.
I am sure that this was not supposed to be taken this literally, and maybe, since all pure Haskell code is functional and variables never vary in Haskell, this doesn't apply at all to Haskell, but what was it supposed to mean?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Functions and Fractals: Sierpinski triangles
You are viewing a single comment's thread. Return to all comments →
Quite easy to solve with variables in Haskell, but what exactly is the intended meaning of "cannot declare even local variables!" when applied to Haskell? Technically, in Haskell, every function is a variable containing a lambda expression, so this, taken literally, would mean that one can't write any functions. In particular, one can't write a main function, which automatically makes the task impossible.
I am sure that this was not supposed to be taken this literally, and maybe, since all pure Haskell code is functional and variables never vary in Haskell, this doesn't apply at all to Haskell, but what was it supposed to mean?