Document Bind and friends

This commit is contained in:
2024-09-13 19:24:23 -06:00
parent 3e8b0e663c
commit 6256b73325
2 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,8 @@
{{end}}{{end}}{{end -}}
{{define "func" -}}
{{if eq . 1}}// Bind combines p with a parser created by f that depends on p's result value.
{{- else}}// Bind{{.}} is equivalent to {{.}} nested calls to Bind.{{end}}
func Bind{{.}}[In, Out{{range .Count}}, T{{.}}{{end}} any](
p Parser[In, T],
{{template "fparams" .}}) Parser[In, Out] {