|
|
|
|
|
by Woost
4920 days ago
|
|
Would something like the above code be on your interview? (pow = 1 : [ 2*x | x <- pow]) I'd probably fail it even though I do understand recursion. I don't know Haskell, and the above is rather cryptic to me. I can infer that it raises 2 to a power, but I'm not sure how it works -- both in how it's called (does that define a function? Pow(4) --> 16?) and the why (the last part defines the recursion I assume, but what happens when you need multiple args, and what does it mean?) |
|
Edit: But to answer your question: yes, I would like to be asked. I did a lot of interviews from the employee side just because I was curious, and, at least in the Netherlands, they never gave me a test. Just looked at my (possibly fake if I wanted) credentials and said yes/no. No tests, at all.