danielle~! ✅ is a user on octodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

What the hell is a function called "nub" (given type: [Int] -> [Int]) supposed to do? I love instructors that don't give details

danielle~! ✅ @00dani

@elomatreb the idea is that the nub of a list (its gist, main point) is the unique elements of that list

it doesn't make sense even when you know what a nub is tbh. the main point of lists (over, say, sets) is that they can contain duplicates. so who even knows

· Web · 0 · 1

@00dani I have never heard it used like that, but it appears you're right

I still don't get why it isn't named dedup or unique or something like that though

@elomatreb yeah, haskell has some friggin weird function names, that's one of the worst imho. 'uniq' or even 'unique' spelt out in full would be way better