<div dir="ltr">Hi all,<div><br></div><div>I'm writing an encrypt/decrypt stuff in Erlang, the input and output are both lists (or binary). In other words, I need to generate a list of bytes based on another list of bytes. During the generating there are a lot of band, bor, bxor, bsl, bsr, etc operations. Every element in the new list (the output) would be updated many times.</div><div><br></div><div>In other language, like C or Python, we can init an output list and then update its elements inline. In Erlang, what I currently do, would make a copy of the list every time when an element need to update. This looks not quite right.</div><div><br></div><div>Any comments/ideas on this? I want to use pure Erlang to implement it, rather than making a C port.</div><div><br></div><div>Thanks,</div><div>Hugo</div></div>