Make functions exportable
This commit is contained in:
parent
6904b8d3d3
commit
a25a49c11f
4
main.go
4
main.go
|
@ -4,7 +4,7 @@ package minmax
|
|||
|
||||
// TODO: Handle empty arrays without panicking
|
||||
|
||||
func min(arr []float64) (min float64) {
|
||||
func Min(arr []float64) (min float64) {
|
||||
min = arr[0]
|
||||
for _, v := range arr {
|
||||
if v < min {
|
||||
|
@ -14,7 +14,7 @@ func min(arr []float64) (min float64) {
|
|||
return min
|
||||
}
|
||||
|
||||
func max(arr []float64) (max float64) {
|
||||
func Max(arr []float64) (max float64) {
|
||||
max = arr[0]
|
||||
for _, v := range arr {
|
||||
if v > max {
|
||||
|
|
Loading…
Reference in New Issue