Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005826OCamlOCaml standard librarypublic2012-11-15 00:142012-11-15 00:14
Reporterwarwick 
Assigned To 
PrioritylowSeverityfeatureReproducibilityalways
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0005826: List.take function
DescriptionI 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.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2012-11-15 00:14 warwick New Issue


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker