Smoothie is a tool that decides what smoothie to get

## why

The Hick–Hyman law states that decision time increases logarithmically with more choices. The shop lets patrons choose 1–3 fruits to add to their smoothies. There are up to 10 fruits on any given day — a total of 175 combinations. Assuming it takes ~3 s to consider each combination, I (theoretically) save ~22 s

$\begin{array}{}T=b\xb7{log}_{2}\left(n+1\right)\\ 3\xb7{log}_{2}\left(175+1\right)=22.38\end{array}$Update: I’ve decided I’d save even more time by not buying smoothies and just drinking water

## code

`ui.background(0, 0, 0);`

const re = (a) => a[(Math.random() * a.length) | 0];

const fruits = [

"dragonfruit",

"watermelon",

"apple",

"mango",

"banana",

"carrot",

"strawberry",

"lychee",

"pineapple",

];

function mix() {

const a = re(fruits);

const b = re(fruits);

}

const text = ui.addButton(mix(), 0.15, 0.45, 0.7, 0.1).onClick(() =>

text.setText(mix())

);