     build(Continuation(storage: storage))
   }
 
-  
+  /// Constructs an asynchronous stream from a given element-producing
+  /// closure, with an optional closure to handle cancellation.
+  ///
+  /// - Parameters:
+  ///   - produce: A closure that asynchronously produces elements for the
+  ///     stream.
+  ///   - onCancel: A closure to execute when canceling the stream's task.
+  ///
+  /// Use this convenience initializer when you have an asychronous function
+  /// that can produce elements for the stream, and don't want to invoke
+  /// a continuation manually. This initializer "unfolds" your closure into
+  /// an asynchronous stream. The created stream handles conformance
+  /// to the `AsyncSequence` protocol automatically, including termination
+  /// (either by cancellation or by returning `nil` from the closure to finish
+  /// iteration).
+  ///
+  /// The following example shows an `AsyncStream` created with this
+  /// initializer that produces random numbers on a one-second interval. This
+  /// example uses the Swift multiple trailing closure syntax, which omits
+  /// the `unfolding` parameter label.
+  ///
+  ///     let stream = AsyncStream<Int> {
+  ///             await Task.sleep(1 * 1_000_000_000)
+  ///             return Int.random(in: 1...10)
+  ///         }
+  ///         onCancel: { @Sendable () in print ("Canceled.") }
+  ///     )
+  ///
+  ///     // Call point:
+  ///     for await random in stream {
+  ///         print ("\(random)")
+  ///     }
+  ///
+  ///
   public init(
     unfolding produce: @escaping () async -> Element?, 
     onCancel: (@Sendable () -> Void)? = nil

@available(SwiftStdlib 5.1, *)
extension AsyncStream.Continuation {
  /// Resume the task awaiting the next iteration point by having it return
  /// normally from its suspension point or buffer the value if no awaiting
  /// next iteration is active.
  ///
  /// - Parameter result: A result to yield from the continuation.
  ///
  /// This can be called more than once and returns to the caller immediately
  /// without blocking for any awaiting consumption from the iteration.
  @discardableResult
  public func yield(
    with result: Result<Element, Never>

  }

  /// Resume the task awaiting the next iteration point by having it return
  /// normally from its suspension point.
  ///
  /// - Returns: A `YieldResult` that indicates the success or failure of the
  ///   yield operation.
  ///
  /// Use this method with `AsyncStream` instances whose `Element` type is
  /// `Void`. In this case, the `yield()` call unblocks the awaiting
  /// iteration; there is no value to return.
  ///
  /// If you call this method repeatedly, each call returns immediately, without
  /// blocking for any awaiting consumption from the iteration.
  @discardableResult
  public func yield() -> YieldResult where Element == Void {
    return storage.yield(())
