One of my pet-hates is fellow developers who call an implementation 'generic', but when you peek inside, there's just if-statements that (at best) cover the already-known input types.
Usually I point to Generics as an example of what "generic" actually means: You peek inside List<T>, it doesn't know about your type, it does the right thing anyway.
This is different from ‘parametric polymorphism’, which is what people call generics.
Your list_contains function should be able to just do a == comparison regardless of whether it's an int or a string.
This is effectively no different than adding a parameter to one of your non-"generic" functions and just swapping behaviour based on that?
p0w3n3d•1h ago