amo/next.go

14 lines
241 B
Go
Raw Normal View History

2024-06-04 23:16:12 +03:00
package amo
type NextFunc[V any] func() (V, NextFunc[V], error)
func MakeNextFunc[V any](
href string,
fn func(string) (V, NextFunc[V], error),
) NextFunc[V] {
return NextFunc[V](func() (V, NextFunc[V], error){
return fn(href)
})
}