(<cb! ?exp)
(<cb! ?exp options)
Like <!
but converts callback based expression / function ?exp
into channel
before via cb->c
.
Given option error-selector
can be used to extract an error out of exp result.
Extracted error will be thrown as ExceptionInfo
. No error extraction by default.
Given option value-selector
can be used to extract the value out of exp result
if no error has been extracted before. Extracts first callback arg by default.
Like `<!` but converts callback based expression / function `?exp` into channel before via `cb->c`. Given option `error-selector` can be used to extract an error out of exp result. Extracted error will be thrown as `ExceptionInfo`. No error extraction by default. Given option `value-selector` can be used to extract the value out of exp result if no error has been extracted before. Extracts first callback arg by default.
(<e! ?exp)
Like <!
but tests taken val instance of ExceptionInfo
, if so throws it.
Usage in combination with go*
.
Like `<!` but tests taken val instance of `ExceptionInfo`, if so throws it. Usage in combination with `go*`.
(?map f chs)
Like map but carries thrown
ExceptionInfo` as result.
Usage in combination with <e!
.
Like `map but carries thrown `ExceptionInfo` as result. Usage in combination with `<e!`.
(c->p c)
Creates a promise and resolves it with the val of channel c
taken by <!
, excepted val is an instance of ExceptionInfo
rejects the
promise. Closes the channel after took val.
Creates a promise and resolves it with the val of channel `c` taken by `<!`, excepted val is an instance of `ExceptionInfo` rejects the promise. Closes the channel after took val.
(cb->c [fun & forms])
Converts callback driven function into channel. Use callback
symbol within
expression exp
forms (any level) to mark callback position in argumentlist. If no
callback symbol is found assumes callback needs to be appended to argumentlist.
Converts callback driven function into channel. Use `callback` symbol within expression `exp` forms (any level) to mark callback position in argumentlist. If no callback symbol is found assumes callback needs to be appended to argumentlist.
(go* & body)
Like go
but carries thrown ExceptionInfo
as result.
Usage in combination with <e!
, <p!
and <cb!
.
Like `go` but carries thrown `ExceptionInfo` as result. Usage in combination with `<e!`, `<p!` and `<cb!`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close