Copying a value is a destructive operation. The initial value is deleted while 2 copies are created.
Optionally, an extra "Move" operation can be used to move one of the 2 copies at source location, to create a "conservative copy illusion".
[ while A is not null - decrease A >+ increase 1st next cell >+ increase 2nd next cell << go back to A ] loop
[->+>+<<]
As explained, we can move the 2nd copy to source location to have A, A, 0 instead of 0, A, A
[->+>+<<] copy value >>[-<<+>>]<< go to 2nd copy; move it to source location; then go back to source location
, read a char [->+>+<<] copy value >. go to 1st copy and print >. go to 2nd copy and print
The #1 tech hiring platform