advent-of-code/ranger/rangefunc.go
xuu 50af2114d4
Some checks failed
Go Bump / bump (push) Failing after 6s
Go Test / build (push) Failing after 21s
add ranger
2024-04-05 16:27:02 -06:00

12 lines
165 B
Go

package main
func countRF(n int) func(yield func(int) bool) {
return func(yield func(int) bool) {
for i := range n {
if !yield(i) {
return
}
}
}
}