You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
List.truncate and Array.truncate diverge from Seq.truncate wrt negative inputs #453
Seq.truncate was the original implementation, so IMO the new APIs List.truncate and Array.truncate should match that behavior, i.e. on negative input, return empty collections.
Credit to @imfrancisd for noticing this and pointing it out in #451.
Activity
truncate should not throw ArgumentException when count is negative
PatrickMcDonald commentedon May 17, 2015
I've no idea how I invented that new requirement, the mind boggles. Great catch
imfrancisd commentedon May 17, 2015
Thank you! :-)
I thought I was the only one.