Atom - Œb - Partition (Non-Empty)

Characters: Π, b

Tags: miscellaneous , math , array , combinatorics

Arity: monadic

This atom is monadic, which means it takes one argument.

Functionality

Like ŒṖ (Partition); partition a list but return [[]] for the empty list.

Details

The partition of z is the list of all ways to divide z into sublists. For example, 3R Œb returns [[[1], [2], [3]], [[1], [2, 3]], [[1, 2], [3]], [[1, 2, 3]]].