Object_duplicate_item = class
	Menuaction "_Duplicate" "take a copy of an object" {
	action x = map_unary (copy []) x;
}

#separator

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

Object_group_to_list_item = class
	Menuaction "_Group to List" "turn a group into a list of objects" {
	action x = to_list x;
}

#separator

Object_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";
	}
}

Object_assemble_item = class
	Menuaction "_Assemble Objects"
		"assemble a list of objects into a single object" {
	action x
		= map_unary ass x
	{
		ass x
			= [], 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
			= error "Assemble: not list of Image/Vector/Real/image/real";
	}
}
