A solution to this challenge from r/dailyprogrammer in OCaml:
The program accepts a string containing 'L's, 'R's, and 'S's, which correspond to the instructions "turn left", "turn right", and "step" respectively. A robot initially standing at (0, 0) in the Cartesian plane facing North reads the string and executes the instructions in order, and then loops back to the beginning, for eternity. The task is to determine for the given string whether the robot will return to the starting point infinitely often.
The code can be built with the command
corebuild lr.native