next.go 241 B

12345678910111213
  1. package amo
  2. type NextFunc[V any] func() (V, NextFunc[V], error)
  3. func MakeNextFunc[V any](
  4. href string,
  5. fn func(string) (V, NextFunc[V], error),
  6. ) NextFunc[V] {
  7. return NextFunc[V](func() (V, NextFunc[V], error){
  8. return fn(href)
  9. })
  10. }