Created
          January 25, 2016 07:05 
        
      - 
      
- 
        Save michaelchum/21876e63e108d4b918cf to your computer and use it in GitHub Desktop. 
    Mutually recursive functions to find if an input int is odd or even
  
        
  
    
      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
    
  
  
    
  | let rec | |
| is_even = function | |
| | 0 -> true | |
| | n -> is_odd (n-1) | |
| and | |
| is_odd = function | |
| | 0 -> false | |
| | n -> is_even (n-1) | |
| ;; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment