Last active
          March 16, 2020 11:44 
        
      - 
      
- 
        Save chuwy/d518efcdc2d5ac9d70fbe1636167891a to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | data Option a where | |
| Some : a -> Option a | |
| None : Option a | |
| instance Functor | |
| fmap : (a -> b) -> Option a -> Option b | |
| fmap f (Some a) = Some (f a) | |
| fmap _ None = None | |
| deriving instance Show given Show a | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment