removed haskell lib comments, abstracted bifunctor application