diff options
author | Santiago Lapresta <santiago@typeform.com> | 2015-06-04 18:30:38 +0200 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2015-06-23 10:59:58 -0500 |
commit | ec7647c4ab1c50d7f45c8ff9fd73917af867e0be (patch) | |
tree | 6ea8e6b55a9e99bdc3cde57881300945d9ca84d5 /docs | |
parent | 8aecf82bfef6647315eb96e69eac3f65ce38ee70 (diff) |
Add combinations/0 and combinations/1
Diffstat (limited to 'docs')
-rw-r--r-- | docs/content/3.manual/manual.yml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml index 05e1733f..8d4800d0 100644 --- a/docs/content/3.manual/manual.yml +++ b/docs/content/3.manual/manual.yml @@ -1307,6 +1307,21 @@ sections: input: '["foobar", "barfoo"]' output: ['[false, true]'] + - title: "`combinations`, `combinations(n)`" + body: | + + Outputs all combinations of the elements of the arrays in the + input array. If given an argument `n`, it outputs all combinations + of `n` repetitions of the input array. + + examples: + - program: 'combinations' + input: '[[1,2], [3, 4]]' + output: ['[1, 3]', '[1, 4]', '[2, 3]', '[2, 4]'] + - program: 'combinations(2)' + input: '[0, 1]' + output: ['[0, 0]', '[0, 1]', '[1, 0]', '[1, 1]'] + - title: "`ltrimstr(str)`" body: | |