Is the current state valid (stored in the cache)?

is_valid(flow, state = "current")

Arguments

flow

A flow object, e.g. as returned by flow_fn.

state

A flow state. It can be either a valid state index (integer) or a valid state: "current", "all", in_hash or out_hash (string).

Value

A logical value, whether the value can be obtained without triggering computation.

Examples

fn <- function(x, y) { x + y + 9 } flowed_fn <- flow_fn(2, 3, fn = fn)
#> New cache: fn=fn / fn_id=1 / fn_key=f802f2343ab49835
is_valid_flow <- is_valid(flowed_fn)