Skip to content

add max to function signature #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Combinations [![Build Status](https://travis-ci.org/jgallen23/combinations.svg?b

# Usage

combinations(array[, min_output_array_size])
combinations(array[, min, max])

* takes in an array, and outputs an array of arrays, containing all possible combinations of values in the original array.
* combinations are of all sizes: all combinations of one element, and all combinations of 2 elements, and so on
* minimum number of elements in a combination can be specified (min_output_array_size)
* maximum number of elements in a combination can be also specified
*   `min` sets minimum number of elements in a combination
*   `max` sets maximum number of elements in a combination
* if maximum combination value is bigger than array elements it will be overridden to the array length

# Example
Expand Down Expand Up @@ -53,4 +53,4 @@ Combinations [![Build Status](https://travis-ci.org/jgallen23/combinations.svg?b
// [ 'red', 'green' ], [ 'orange', 'yellow' ],
// [ 'orange', 'green' ], [ 'yellow', 'green' ],
// [ 'red', 'orange', 'yellow' ], [ 'red', 'orange', 'green' ],
// [ 'red', 'yellow', 'green' ], [ 'orange', 'yellow', 'green' ] ]
// [ 'red', 'yellow', 'green' ], [ 'orange', 'yellow', 'green' ] ]