itertools

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package itertools provides a method to generate all combinations out of a given generic type array.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Combinations

func Combinations[T any](s []T, n int) (ss [][]T)

Combinations returns combinations of n elements for a given s slice.

Modified version to comply with requirements.

  • return [][]T{} on empty combinations
  • return [][]T{} if n <= 0

Original license: MIT Copyright (c) 2018 Max Schmitt

Types

This section is empty.

Jump to

Keyboard shortcuts

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