Up – webdriver_cohttp-lwt-unix » Webdriver_cohttp_lwt_unix » InfixModule Webdriver_cohttp_lwt_unix.Infix
Since the ~session
parameter is generally constant, this module provides a reader monad to sequence multiple commands within the same session. You can either pass explicitly the ~session
argument or open this module.
val lift : 'a io -> 'a cmd
lift io
wraps an I/O action as a WebDriver command.
val return : 'a -> 'a cmd
val map : ('a -> 'b ) -> 'a cmd -> 'b cmd
val map2 : ('a -> 'b -> 'c ) -> 'a cmd -> 'b cmd -> 'c cmd
val bind : ('a -> 'b cmd ) -> 'a cmd -> 'b cmd
val (>>|) : 'a cmd -> ('a -> 'b ) -> 'b cmd
cmd >>| fn
is map fn cmd
.
val (|<<) : ('a -> 'b ) -> 'a cmd -> 'b cmd
fn |<< cmd
is map fn cmd
.
val (<*>) : ('a -> 'b ) cmd -> 'a cmd -> 'b cmd
fn <*> arg
is map2 (fun f x -> f x) fn arg
.
val (>>=) : 'a cmd -> ('a -> 'b cmd ) -> 'b cmd
cmd >>= fn
is bind fn cmd
.
val (=<<) : ('a -> 'b cmd ) -> 'a cmd -> 'b cmd
fn =<< cmd
is bind fn cmd
.
val let+ : 'a cmd -> ('a -> 'b ) -> 'b cmd
let+ x = cmd in e
is map (fun x -> e) cmd
val let* : 'a cmd -> ('a -> 'b cmd ) -> 'b cmd
let* x = cmd in e
is bind (fun x -> e) cmd
val and* : 'a cmd -> 'b cmd -> ('a * 'b ) cmd
val and+ : 'a cmd -> 'b cmd -> ('a * 'b ) cmd