Skip to content

partitions(0) does not return empty set #79

@jessebett

Description

@jessebett

Currently

julia> partitions(0)|>collect
1-element Array{Any,1}:
 #undef

This is unexpected because the partition of the empty set is the empty set so I would expect

patitions(0)|>collect == [[]]

This results in unexpected behviour here:

julia> [length(b) for b in partitions(1)]
1-element Array{Int64,1}:
 1

julia> [length(b) for b in partitions(0)]
1-element Array{Int64,1}:
 4492284592

# I expect this
julia> [length(b) for b in [[]]]
1-element Array{Int64,1}:
 0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions