---
layout: "default"
title: "AnySequence"
root: "/v5.1"
keywords: ""
description: "Swift documentation for 'AnySequence'"
---

<div class="intro-declaration"><code class="language-swift">struct AnySequence</code></div><p>A type-erased sequence.</p>
<table class="standard"><tr><th id="inheritance">Inheritance</th><td><code class="inherits">Sequence</code></td></tr><tr><th id="aliases">Associated Types</th><td><span id="aliasesmark"></span><div class="declaration"><code class="language-swift">public typealia