-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
As is noted here (though wrongly called Ring.find_map_rev), this function would be useful for performance-reasons when updating the Ring ring-buffer defined in lib/conntest.ml.
The performance gain will probably be relatively small as the ring-buffer is not too big, but it's nice to avoid unneccesary iteration.
The idea is that Ring has a primarily functional interface, and the new map_rev_shortcircuit would allow one to modify the ringbuffer starting from the latest added element, and stop iterating when None is returned by the given lambda.
The type would then be:
val map_rev_shortcircuit : ('a -> 'a option) -> 'a t -> 'a tReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers