The := and =< assignment operators have different effects when they are used to modify an element of a list contained in a variable, since =< modifies the element by reference. Otherwise, they will have the same effect.
For example, if
Input:
then
Input:
and
Input:
both change A[1] to 5, so A will be
[1,5,3], but they do it in different ways. The command
A[1] =< 5 changes the middle value in the list that
A originally pointed to, and so any other variable pointing
to the list will be changed, but A[1] := 5 will create a
duplicate list with the middle element of 5, and so any other variable
pointing to the original list won’t be affected.
Input:
Output:
Input:
Output:
If B is set equal to a copy of A instead of
A, then changing B won’t affect A.
Input:
Output: