loading...

re: Can you spot the problem in the implementation of nthElement? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: you could perhaps optimize it to leverage the "tail-recurssive" optimization by doing something like this btw: nthElementHelper : List a -> ...
 

although come to think of it you're already doing "tail-recurssion"

 

yeah, I'm already doing that

I still prefer the case of on a tuple than a case of with some if then else branching inside but that's personal taste :)

code of conduct - report abuse