Skip to content

Commit

Permalink
Update fun.v - Fix typos (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
pgp authored Dec 10, 2023
1 parent edf4fc8 commit a12dee0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/fun.v
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pub fn (t &Tensor[T]) map[T](f fn (x T, i []int) T) &Tensor[T] {
return ret
}

// reduce reduces a function to a given Tensor retuning a new agregatted value
// reduce reduces a function to a given Tensor retuning a new aggregated value
pub fn (t &Tensor[T]) reduce[T](init T, f fn (acc T, x T, i []int) T) T {
mut ret := init
mut iter := t.iterator()
Expand Down Expand Up @@ -55,7 +55,7 @@ pub fn (t &Tensor[T]) nmap[T](ts []&Tensor[T], f fn (xs []T, i []int) T) !&Tenso
return ret
}

// nreduce reduces a function to a given list of Tensor retuning a new agregatted value
// nreduce reduces a function to a given list of Tensor retuning a new aggregated value
pub fn (t &Tensor[T]) nreduce[T](ts []&Tensor[T], init T, f fn (acc T, xs []T, i []int) T) !T {
mut ret := init
mut iters, _ := t.iterators[T](ts)!
Expand Down

0 comments on commit a12dee0

Please sign in to comment.