Add an "also" function to facilitate function chaining
I propose adding an also
function that takes a (void)=>void
lambda (with context) and returns this
. It would be useful for function chaining purposes, for example:
var connection = ConnectionBuilder
.url ("https://example.com")
.port (80)
.observe (other_lambda)
.build ()
.also ( () => { this.disable_ssl_errors();})
.on_success (success_handler)
.on_error (error_handler)
.also ( () => { this.execute();} );
further_process_connection(connection);
The naming does not really matter, as long as it's understandable.
Edited by Mario Daniel Ruiz Saavedra