From 7b564d5e89c6862616937b9c7d4ea8d82760b894 Mon Sep 17 00:00:00 2001 From: kalmar Date: Thu, 11 May 2017 17:49:56 +0200 Subject: [PATCH] but it makes more sense to define word for abstract GWords --- src/Groups.jl | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Groups.jl b/src/Groups.jl index 07febd1..9675d09 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -36,12 +36,10 @@ GWord{T<:GSymbol}(s::T) = GWord{T}([s]) convert{T<:GSymbol, W<:Word}(::Type{W}, s::T) = GWord{T}(s) -function length(W::GWord) - return sum([abs(s.pow) for s in W.symbols]) -end end +length(W::GWord) = sum([length(s) for s in W.symbols]) function join_free_symbols!(W::GWord) reduced = true