Repeat returns an Iterator that repeatedly returns the same value.
(value T)
| 257 | |
| 258 | // Repeat returns an Iterator that repeatedly returns the same value. |
| 259 | func Repeat[T any](value T) Iterator[T] { |
| 260 | return &repeatIter[T]{ |
| 261 | value: value, |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | func (it *repeatIter[T]) Next() Option[T] { |
| 266 | return Some(it.value) |
no outgoing calls
searching dependent graphs…