arturo-lang/arturo

[Collections\combine] should follow the rule: C[n:k] = 0, for k > n

Opened this issue · 0 comments

[Collections\combine] should follow the rule: C[n:k] = 0, for k > n
being k the attribute by, n the size of the collection and
C the amount of possible combinations:

ensure -> empty? combine.by: 4 [a b c] 
ensure -> empty? combine.by: 5 [a b c] 
ensure -> empty? combine.by: 6 [a b c] 

# TODO(Collections\combine) should follow the rule: C[n:k] = 0, for k > n

    # TODO(Collections\combine) should also work with in-place Literals?
    #  labels: library, enhancement, open discussion

    # TODO(Collections\combine) should follow the rule: C[n:k] = 0, for k > n
    #  being k the attribute by, n the size of the collection and 
    #  C the amount of possible combinations:
    #
    #  ```art
    #  ensure -> empty? combine.by: 4 [a b c] 
    #  ensure -> empty? combine.by: 5 [a b c] 
    #  ensure -> empty? combine.by: 6 [a b c] 
    #  ``` 
    # labels: library, open-discussion
    builtin "combine",
        alias       = unaliased,
        op          = opNop,
ndex b034d7e282..de0238fc99 100644
++ b/src/library/Comparison.nim

80f39a47d62f96ec111e3e0307355f88c2d8afb3