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
A general remark about such additions to the standard library: in a perfect world, you would be using an extension library as a matter of fact for all your programs, and the standard library should probably be renamed to "the minimal library". We don't have the manpower and the will to maintain an extensive library in addition to the compiler, so this task should be (and is) picked up by the community.
Original bug ID: 5826
Reporter: warwick
Assigned to: @alainfrisch
Status: resolved (set by @alainfrisch on 2016-12-06T15:23:27Z)
Resolution: suspended
Priority: low
Severity: feature
Category: standard library
Bug description
I think it would be really good to add a function
List.take : a' list -> int -> 'a list
which could work similarly to List.nth except for returning a list of items up to and including the 'nth' one.
This seems like a useful core function for the standard library rather than having to download an extension library to handle it.
I'd find it most useful for finding the top 'n' items in a list: doing a List.sort followed by List.take
Thanks for considering this request.
The text was updated successfully, but these errors were encountered: