Skip to content

docs: remove stale func from pipe statement keywords#6087

Merged
max-sixty merged 1 commit into
mainfrom
docs/pipes-func-statement
Jul 22, 2026
Merged

docs: remove stale func from pipe statement keywords#6087
max-sixty merged 1 commit into
mainfrom
docs/pipes-func-statement

Conversation

@prql-bot

Copy link
Copy Markdown
Collaborator

Nightly survey finding. reference/syntax/pipes.md listed func as a statement keyword ("before a new statement, which starts with let or from (or func)"), but func no longer begins a statement in current PRQL — it only introduces an anonymous-function expression (func x -> ...); functions are declared with let name = func ....

Evidence: the statement parser accepts only module / type / import / var-def statements (prqlc-parser/src/parser/stmt.rschoice((module_def, type_def(), import_def(), var_def()))), and func is parsed as an expression by lambda_func (prqlc-parser/src/parser/expr.rs). The func add x -> ... statement form was valid in much older PRQL, so the note is stale.

No automated test: this is a prose bullet in the book with no executable code block to assert against.

`func` no longer begins a statement; it only introduces an anonymous
function expression. Functions are declared with `let name = func ...`.
@max-sixty
max-sixty merged commit f89ce16 into main Jul 22, 2026
37 checks passed
@max-sixty
max-sixty deleted the docs/pipes-func-statement branch July 22, 2026 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants