let flatMap f opt = Belt.Option.flatMapU opt (fun [@bs] x -> f x)