Anonymous | Login | Signup for a new account | 2019-02-20 14:02 CET | ![]() |
Main | My View | View Issues | Change Log | Roadmap |
View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0006279 | OCaml | standard library | public | 2013-12-21 14:32 | 2016-12-06 19:37 | |||||||
Reporter | dbuenzli | |||||||||||
Assigned To | gasche | |||||||||||
Priority | normal | Severity | feature | Reproducibility | have not tried | |||||||
Status | resolved | Resolution | fixed | |||||||||
Platform | OS | OS Version | ||||||||||
Product Version | 4.01.0 | |||||||||||
Target Version | 4.03.1+dev | Fixed in Version | 4.04.0 | |||||||||
Summary | 0006279: Set.map | |||||||||||
Description | would be nice. I have already written the following a few times in my life: module Sset = Set.Make(String) let sset_map f s = Sset.fold (fun e acc -> Sset.add (f e) acc) s Sset.empty Thanks. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
![]() |
|
(0010869) braibant (reporter) 2014-01-30 21:54 |
Also, in the same vein, I find myself writing a "of_list" function quite often module MSet = struct module Make(E:Set.OrderedType) = struct include Set.Make(E) let of_list l = List.fold_right (add) l empty end end I agree that this is a one-liner, but a frequent one... |
(0010878) frisch (developer) 2014-02-04 11:12 edited on: 2014-02-04 11:13 |
@braibant: Set.of_list has already been added to trunk (will be available in OCaml 4.02), with a somewhat optimized implementation. See 0004986. |
(0010953) doligez (administrator) 2014-02-19 17:17 edited on: 2014-02-19 17:17 |
May I remind everyone that the best place for such functions is "extended" libraries like Batteries and Jane Street Core? |
(0015797) gasche (administrator) 2016-04-18 23:06 |
I'm postponing this to 4.04, but I proposed a pull request at: https://github.com/ocaml/ocaml/pull/553 [^] |
![]() |
|||
Date Modified | Username | Field | Change |
2013-12-21 14:32 | dbuenzli | New Issue | |
2014-01-30 21:54 | braibant | Note Added: 0010869 | |
2014-02-04 11:12 | frisch | Note Added: 0010878 | |
2014-02-04 11:13 | frisch | Note Edited: 0010878 | View Revisions |
2014-02-19 17:17 | doligez | Note Added: 0010953 | |
2014-02-19 17:17 | doligez | Note Edited: 0010953 | View Revisions |
2014-05-30 13:46 | shinwell | Status | new => acknowledged |
2014-07-16 18:05 | doligez | Target Version | => 4.03.0+dev / +beta1 |
2015-12-09 21:50 | xleroy | Severity | minor => feature |
2016-04-18 23:06 | gasche | Note Added: 0015797 | |
2016-04-18 23:06 | gasche | Target Version | 4.03.0+dev / +beta1 => 4.03.1+dev |
2016-12-06 19:37 | frisch | Status | acknowledged => resolved |
2016-12-06 19:37 | frisch | Fixed in Version | => 4.04.0 |
2016-12-06 19:37 | frisch | Resolution | open => fixed |
2016-12-06 19:37 | frisch | Assigned To | => gasche |
2017-02-23 16:43 | doligez | Category | OCaml standard library => standard library |
Copyright © 2000 - 2011 MantisBT Group |