From 64d5466aa758dc157850fb97b1f47a497705b7d3 Mon Sep 17 00:00:00 2001 From: kalmar Date: Thu, 18 May 2017 12:21:31 +0200 Subject: [PATCH] rename variables to less confusing names --- src/Groups.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Groups.jl b/src/Groups.jl index 1bb444b..394c322 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -272,11 +272,11 @@ function findfirst(W::GWord, Z::GWord) if idx + n - 1 > length(W.symbols) break end - first = is_subsymbol(Z.symbols[1],a) - if first - middle = W.symbols[idx+1:idx+n-2] == Z.symbols[2:end-1] - last = is_subsymbol(Z.symbols[end], W.symbols[idx+n-1]) - if middle && last + foundfirst = is_subsymbol(Z.symbols[1],a) + if foundfirst + middlematch = W.symbols[idx+1:idx+n-2] == Z.symbols[2:end-1] + lastmatch = is_subsymbol(Z.symbols[end], W.symbols[idx+n-1]) + if middlematch && lastmatch return idx end end