Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Fun.DeepSourceUseful helper functions for deep handlers.
finally f runs the thunk f and calls continue if a value is returned and discontinue if an exception is raised. Here is an example that calls List.nth and then either returns the found element with continue or raises the exception Not_found with discontinue.
Algaeff.Fun.Deep.finally k @@ fun () -> List.nth elements nreperform k e performs the effect e and then resumes the execution with the continuation k, in a way similar to finally. It relays the result of performing the effect e with continue or discontinue depending on whether an exception is raised.