let
lock shared (id, scope) =
(get_scoped shared scope).lock id