1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-25 18:15:29 +01:00

formatting

This commit is contained in:
kalmar 2017-07-05 16:22:50 +02:00
parent 2df2dd7bd6
commit 08ebec118f

View File

@ -345,7 +345,7 @@ function replace(W::GWord, index, toreplace::GWord, replacement::GWord)
end end
function replace_all!{T}(W::GWord{T}, subst_dict::Dict{GWord{T}, GWord{T}}) function replace_all!{T}(W::GWord{T}, subst_dict::Dict{GWord{T}, GWord{T}})
for toreplace in reverse!(sort!(collect(keys(subst_dict)),by=length)) for toreplace in reverse!(sort!(collect(keys(subst_dict)), by=length))
replacement = subst_dict[toreplace] replacement = subst_dict[toreplace]
i = findfirst(W, toreplace) i = findfirst(W, toreplace)
while i 0 while i 0