
3.3 Delivery tools: the Deliver structure
MLWORKS.Deliver
MLWorks.Deliver
val with_delivery_hook: delivery_hook -> ('a -> 'b) -> 'a -> 'b
with_delivery_hook hook f x
delivery_hook.
deliver function is called during the application of f to x. Note that hooks are executed in the order they were added: if h1 is added first, it will be executed first.
MLWorks> fun hello () = print "Hello, world.\n"; val hello : unit -> unit = fnMLWorks> fun deliver_hello () = MLWorks.Deliver.deliver("hello", hello, true); val deliver_hello : unit -> unit = fn
MLWorks> MLWorks.Deliver.with_delivery_hook (fn f => fn x => f x handle _ => print "Delivery failed\n") deliver_hello (); val it : unit = () MLWorks>

Generated with Harlequin WebMaker