Format_duplicate_item = class
	Menuaction "_Duplicate" "take a copy of an object" {
	action x = map_unary copy x;
}

#separator

Format_list_to_group_item = class
	Menuaction "_List to Group" "turn a list of objects into a group" {
	action x = Group x;
}

Format_group_to_list_item = class
	Menuaction "_Group to List" "turn a group into a list of objects" {
	action x = x.value;
}

#separator

Format_break_item = class
	Menuaction "_Break Up Object" 
		"break an object into a list of components" {
	action x
		= map_unary break x
	{
		break x
			= bandsplit x, is_Image x
			= map Vector x.value, is_Matrix x
			= x.value, is_Vector x || is_Real x
			= error "Breakup: not Image/Matrix/Vector/Real";
	}
}

Format_assemble_item = class
	Menuaction "_Assemble Objects" 
		"assemble a list (or group) of objects into a single object" {
	action x
		= ass x.value, is_Group x
		= ass x
	{
		ass x
			= Vector x, is_real_list x
			= Matrix x, is_matrix x
			= bandjoin x, is_listof is_Image x
			= Vector (map get_value x), is_listof is_Real x
			= Matrix (map get_value x), is_listof is_Vector x
			= map_unary ass x, is_list x
			= error "Assemble: not list of Image/Vector/Real/image/real";
	}
}
