  We extend Milnor's mu-invariants of link homotopy to ordered (classical or
virtual) tangles. Simple combinatorial formulas for mu-invariants are given in
terms of counting trees in Gauss diagrams. Invariance under Reidemeister moves
corresponds to axioms of Loday's diassociative algebra. The relation of tangles
to diassociative algebras is formulated in terms of a morphism of corresponding
operads.
