Guest User

Untitled

a guest
Oct 17th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. {-# LANGUAGE TypeFamilies #-}
  2. class Collection c where
  3. type Element c
  4. insert :: Element c -> c -> c
  5.  
  6. instance Collection [a] where
  7. type Element [a] = a
  8. insert = (:)
Add Comment
Please, Sign In to add comment