Partitions of a list
GolfScript, 51 characters
{[[]]\{[.;]`{1$[1$]+@@`1$`{[2$]-@@[+]+}++/}+%}/}:P;

The script defines a variable P which takes an array from top of the stack and pushes back a list of all partitions, e.g.
[1 2] P            # =&gt; [[[1] [2]] [[1 2]]]
[&quot;a&quot; &quot;b&quot; &quot;c&quot;] P    # =&gt; [[[&quot;a&quot;] [&quot;b&quot;] [&quot;c&quot;]] [[&quot;b&quot;] [&quot;a&quot; &quot;c&quot;]] [[&quot;a&quot;] [&quot;b&quot; &quot;c&quot;]] [[&quot;a&quot; &quot;b&quot;] [&quot;c&quot;]] [[&quot;a&quot; &quot;b&quot; &quot;c&quot;]]]

It does also work on larger lists:
6, P ,p            # prints 203, i.e. Bell number B6
8, P ,p            # 4140

You may perform own tests online.