euler

package
v0.0.0-...-0235693 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPrime

func IsPrime(n int) bool

func NextPrime

func NextPrime(n int) int

func PrimeFactors

func PrimeFactors(n int) []int

func SliceClone

func SliceClone[T any](ts []T) []T

func SliceContainsMany

func SliceContainsMany[T comparable](ts []T, ots []T) bool

func SliceContainsOne

func SliceContainsOne[T comparable](ts []T, t T) bool

func SliceFindIdx

func SliceFindIdx[T comparable](ts []T, t T) int

func SliceOf

func SliceOf[T constraints.Integer](min, max T) []T

func SliceProduct

func SliceProduct[T constraints.Integer | constraints.Float](ts []T) T

func SliceRemain

func SliceRemain[T comparable](from []T, in []T) []T

func SliceRemoveIdx

func SliceRemoveIdx[T any](ts []T, ri int) []T

func SliceSum

func SliceSum[T constraints.Integer | constraints.Float](ts []T) T

func SliceSumFunc

func SliceSumFunc[T constraints.Integer | constraints.Float](ts []T, transform func(t T) T) T

func SmallestMultipleOf

func SmallestMultipleOf(ns ...int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL