Skip to content

Commit

Permalink
correct some documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
knusbaum committed Nov 30, 2023
1 parent 050235c commit 7c6b74e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions map.go
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ func (g *generateSeq[T, U]) Lazy(f func(func() T) bool) {
// accumulator value after `f` has been run over every element of `s`.
//
// Note: Running a fold on an unbounded sequence will never terminate.
// One should usually use Split() or Fold() on unbounded sequences first
// One should usually use Split() or Take() on unbounded sequences first
// to limit the output.
//
// For example, to sum the first 1000 primes (with imaginary isPrime and sum
Expand Down Expand Up @@ -649,8 +649,8 @@ func Filter[T any](s Seq[T], f func(T) bool) Seq[T] {

// ToSlice converts a Seq[T] into a []T.
//
// Note: Running a fold on an unbounded sequence will never terminate.
// One should usually use Split() or Fold() on unbounded sequences first
// Note: Running ToSlice on an unbounded sequence will never terminate.
// One should usually use Split() or Take() on unbounded sequences first
// to limit the output.
func ToSlice[T any](s Seq[T]) []T {
var sl []T
Expand All @@ -661,7 +661,7 @@ func ToSlice[T any](s Seq[T]) []T {
return sl
}

// Always takes a function accepting an element T and returns nothing,
// Always takes a function accepting an element T which returns nothing,
// and returns a function that does the same thing but always returns true.
//
// This is useful for calls to Iterate:
Expand Down

0 comments on commit 7c6b74e

Please sign in to comment.