3 ms·
> It can't filter or order in any way, since there are no restrictions or functions provided, it can't aggregate for the same reason, that leaves either the fir
by jlarocco 13y ago
> It can't filter or order in any way, since there are no restrictions or functions provided, it can't aggregate for the same reason, that leaves either the first item or the last item.
That doesn't logically follow. Technically it can return any item in the list. Without some kind of documentation there's no way to know.
Saying "you can guess what it does" doesn't buy me anything over any other language. I can guess what a function does in C or C++, too, and in my experience I'll guess right in C and C++ more often than I will in Haskell.
- Guvante 13y ago> Technically it can return any item in the list But that is all it can return. By looking at the name I know with 100% certainty what it is. > I can guess what a function does in C or C++, too Never without the name. Too few functions are actually pure and the difference in a pure signature and a non-pure one doesn't exist. Heck if it is C or C++ it could cast all the void* to int* and find the first one that is non-null and points to a positive value.