Thanks @kantian for those suggestions and background investigation! I’ll try to PR those when I get a chance. I was about to write a PR for LazyList.equal
the other day when I realized that embedded lazy lists would create a problem for the simple definition without the optional argument, and then noticed equal
in the Enum
docs, and wanted to see what response I got in this thread.
In this case, it may me more useful to mimic the forall2 definition to not raise an exception
By default I usually incline toward making use of functions that are already there, i.e. for_all2
in this case. After all, maybe someone will come up with a more efficient implementation of for_all2
, and then equal
will benefit. (The recent discussion of alternative List.map
implementations was striking.) Is wrapping for_all2
in try
/with
potentially less efficient? Or just aesthetically undesirable? I don’t know anything about the exception mechanism, and am not sure I want to try to figure it out right now.