my contribution:
with the way you use to remove the current item from the list, a list like this
a;b;ba;a;c
would be treated like it was this
a;b;c
that's bad.
by using {.cut.} you solve this problem, and it's even faster.
i also used {.dequote.} to get the $2 executed, instead of using variable domacro.
i added {.trim.} to avoid adding extra spaces.
{.set|#doforlist|{:{.trim|
{.set|#seperator|{.switch|{.length|$3.}||0|;|$3.}.}
{.set|#list|$1{.^#seperator.}.}
{.set|#entries|{.count substring|{.^#seperator.}|{.^#list.}.}.}
{.while|#list|{:{.trim|
{.set|#curitem|{.substring||{.^#seperator.}|{.^#list.}.}.}
{.cut|var=#list|from={.add|2|{.length|var=#curitem.}.}|size=.}
.}{.dequote|{.replace|%cur%|{.^#curitem.}|$2.}.}:}.}
.}:}.}
EXAMPLE
{.^#doforlist|{.get|accounts.}|{:%cur%:{.get account|%cur%|member of.}
:}.}
i hope you enjoy this changes