Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If I'm reading the code correctly: given the list [5,5,2,3] and the match (p:xs), p will match to the first 5 and xs will match to [5,2,3].

Once the matching is done, the pivot is no longer in the list xs, and therefore it won't be included twice.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: