# Range-Over Functions in Go

DevFeed: [Range-Over Functions in Go](<https://devfeed.tech/articles/range-over-functions-in-go-22234.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2024/04/range-over-functions-in-go.html>)

Published: 2026-02-16T00:00:00Z

Content type: article

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Programming language](<https://devfeed.tech/topics/programming-language.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>)

Tags: [ardan-labs](<https://devfeed.tech/tags/ardan-labs.md>), [blog](<https://devfeed.tech/tags/blog.md>), [code](<https://devfeed.tech/tags/code.md>), [examples](<https://devfeed.tech/tags/examples.md>), [generators](<https://devfeed.tech/tags/generators.md>), [go](<https://devfeed.tech/tags/go.md>), [go-programming](<https://devfeed.tech/tags/go-programming.md>), [golang](<https://devfeed.tech/tags/golang.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

## AI overview

This article explains Go's range-over-functions experiment, which proposes a standardized iterator model while preserving the familiar for range syntax. It introduces the iter package and sequence abstractions, compares iteration patterns, and uses stack examples to show how iterator logic can be implemented.

## Source excerpt

Iteration has long been one of the more fragmented areas of Go, with developers relying on ad hoc patterns to traverse custom data structures. This article explores the range-over-functions experiment, a proposed evolution of the language that introduces a standardized iterator model while preserving Go's familiar for range syntax. Using the new iter package and sequence abstractions, it shows how iteration logic can be expressed more clearly, flexibly, and idiomatically. Originally published in April 2024, the concepts remain highly relevant as Go continues to evolve toward more expressive yet simple language features.