converted examples_score.py to a haskell version