3 ms·
That looks interesting. The code is not simpler to understand nor is it more efficient, but it seems to work, assuming target is in the list. How would you repr
by scscsc 6y ago
That looks interesting. The code is not simpler to understand nor is it more efficient, but it seems to work, assuming target is in the list. How would you represent the empty list?
Not sure why you are being downvoted.
- wanderer2323 6y agoThe representation of the empty list does not change, it's still an IntList object with a null Head field. The downvotes probably come from my blatant disregard of the real-world performance in the search of what I considered the real take-away from the article.