Integrating reinforcement learning into a programming language