it's probably been done and is called haskell