The prose uses variables `x` and `t` but the sample code uses `a` and `t`. I think this is a typo. (confused me for half an hour - i'm a beginner!)