Learning Scala by writing a Prolog interpreter