To optimise, you can replace this part of your code:

```
:52→dim(∟CARD
:For(A,1,13
:For(B,0,3
:A+(B/4→∟CARD(1-A+13(B+1
:End
:End
```

With:

`.25(3+cumSum(binomcdf(51,0→CARD`

The

binomcdf( command returns a list. When you use probability 0, it will create N+1 elements of 1s. You then have {1,1,1,1,1,…,1} and then the

cumSum( command turns that into {1,2,3,4,…,52} and it is all pretty quick (faster and smaller than using

seq(x,x,1,52)). Add 3 to the list and we have {4,5,6,7,…,55}. Multiply by .25 and we finally have {1,1.25,1.5,1.75,2,2.25,…,13.75}.

However, since you are just randomly selecting from this, later, you don't even need to make this list :P Your total program could be:

```
Repeat Ans=45
randInt(0,3→A
sub("A234567890JQK",randInt(1,13),1
If Ans="0
"1"+Ans
Disp "CARD:",Ans+" OF "+sub("CLUBSHEARTSSPADES DIAMONDS",1+.5A²+4.5A,5+A
Repeat 30=abs(Ans-75
getKey
End
End
```

It saves 63 bytes and doesn't create the 483 byte list :D

I am not sure exactly why you created the list, but were you thinking to use something like the deck of cards routine? If so, that trick works like this:

- Create a list of N elements (52 for a deck of cards)
- Use rand(N to create another list of N elements. However, this list will be random and every number will be different. This means there is one unique way to organise them from least to greatest (or greatest to least)
- Use SortA( to sort both lists (the random list is the first argument, followed by the created list). The list elements that correspond to each other will be moved together. The random list will be sorted in ascending order, but it completely messes up the order of the original list.
- You have now shuffled your list :)

So the code would be something like:

```
.25(3+cumSum(binomcdf(51,0→L1
rand(52→L2
SortA(L2,L1
```

And now L1 has been shuffled :)