* @param p1
	 */
	public static <A> void eachArrangement(List<A> list,
			final P1<List<A>> p1) {
		if (list.size() == 1) {
			p1.e(list);
		} else if (list.size() == 2) {
			p1.e(list);
			p1.e(Arrays.asList(list.get(1), list.get( 0 )));
		} else {
			for (int i = 0; i < list.size(); i++) {
				final A a = list.get(i);
				final LinkedList<A> feed = new LinkedList<A>();
                List<A> splice = splice(i, 1, list);
                eachArrangement(splice, new P1<List<A>>() {public void e(List<A> subList) {
					feed.add(a);
					feed.addAll(subList);
					p1.e(feed);
					feed.clear();
				}});
			}
		}
		
		
	}