Beginner-friendly OCaml exercise. You can find more details in Mike Hadlow and Mark Seemann's pages.
Also great article from Mark Seemann about programming katas https://blog.ploeh.dk/2020/01/13/on-doing-katas/
$ opam install core
$ dune build journeys.exe
$ ./_build/default/journeys.exe journeys
1 1 E: true
3 3 N: true
2 4 S: true
5 4 E: true