# Pastebin U5zmlo8v Indeed, that bit of code looks to me like it reduces to this one-liner: let storage = Optdef.to_option (Dom_html.window##localStorage)