package algaeff

  1. Overview
  2. Docs

Source file Fun.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
module Deep =
struct
  let finally k f =
    match f () with
    | x -> Effect.Deep.continue k x
    | exception e -> Effect.Deep.discontinue k e
end

module Shallow =
struct
  let finally_with k f h =
    match f () with
    | x -> Effect.Shallow.continue_with k x h
    | exception e -> Effect.Shallow.discontinue_with k e h
end
OCaml

Innovation. Community. Security.