sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
val run :
?export_prefix:Trie.bwd_path ->
?init_visible:(Param.data, Param.tag) Trie.t ->
(unit -> 'a) ->
'a
run f h
initializes a scope and executes the thunk f
, using h
to handle modifier effects.
Execute the code and handles the internal modifier effects. This can be used to intercept or reperform those effects; for example, the following function silences the shadow
effects. See also Modifier.S.Run.try_with
.
module H =
struct
include Perform
let shadow _ _ _ y = y
end
let silence_shadow f = let module R = Run (H) in R.try_with f
Note that run
starts a fresh empty scope while try_with
remains in the current scope.