---
title: Value<V>
description: Reference for the Value type, an asynchronous value.
---

# Value\<V\>

A dataflow value (also known as a *value channel*) is an asynchronous value of type `V`. It is used to facilitate dataflow logic in a workflow.

The following methods are available for a dataflow value:

##### `combine( right: Value ) -> Value<Tuple>` {#combine}

Combines the dataflow value with another dataflow value.

Tuples in both the left- and right-hand sources are flattened in the combined tuple. For example, `tuple(1, 2)` and `tuple('red', 'blue')` are combined as `tuple(1, 2, 'red', 'blue')`.

##### `combine( [opts] ) -> Value<Record>`

Augments a record by adding each named argument as a record field. Each named argument can be a value or dataflow value.

##### `flatMap( transform: (V) -> Iterable<R> ) -> Channel<R>` {#flatmap}

Transforms the dataflow value into a collection with the given closure and emits the resulting values in a dataflow channel.

##### `map( transform: (V) -> R ) -> Value<R>` {#map}

Transforms the dataflow value into another dataflow value with the given closure.

##### `mix( other: Channel<V> ) -> Channel<V>` {#mix}

Emits the dataflow value and the values from another channel into a single output channel.

##### `subscribe( action: (V) -> () )` {#subscribe}

Invokes the given closure on the dataflow value.

##### `view() -> Value<V>` {#view}

Prints the dataflow value to standard output.

##### `view( transform: (V) -> String ) -> Value<V>`

Transforms the dataflow value using the given closure and prints the result to standard output.
