रेंडरिंगhi

आगेबढ़ो

Translation status: हिन्दी reader-locale proof. Term names and code fences follow the hi pack; supporting prose may still be English.

Yields one value from a generator.

Aliases: yield

Syntax: आगेबढ़ो <expression>

Category#

async

Examples#

radix/corpus/cede/cede.fab (canonical · keyword)#

Yields one value from a generator.

# =============================================================================
# आगेबढ़ो — Yields one value from a generator.
# =============================================================================
#
# What this teaches:
#   • Yield — `आगेबढ़ो <expression>` emits one item from a `जनक` or `async_जनक`
#     callable
#   • Async values use `रुको_स्थिर`, `रुको_चर`, `रुको_लौटाओ`, or `रुको`; `आगेबढ़ो`
#     is not an await form
#
# Common mistakes:
#   • using `आगेबढ़ो` outside a generator body
#
# See also: संकेतक, जनक, async_जनक
# =============================================================================

# आगेबढ़ो — yield from a stream function
#
# फलन stream() जनक → T { आगेबढ़ो value }
#
# GRAMMAR:
#   yieldStmt :← 'आगेबढ़ो' expr
#
# EXPECTED OUTPUT:
#   [1, 2]
#
# BACKEND:
#   Cursor stream materialization smoke.

fn stream() generator → int {
    yield 1
    yield 2
}

main {
    print stream()
}

Expected output:

[1, 2]