mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			326 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			326 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| definition module GenHylo
 | |
| 
 | |
| import StdGeneric, GenMap
 | |
| 
 | |
| :: Fix f = In (f .(Fix f))
 | |
| Out :: !u:(Fix v:a) -> v:(a w:(Fix v:a)), [u <= w]
 | |
| 
 | |
| hylo :: ((.f .b) -> .b) (.a -> (.f .a)) -> (.a -> .b) | gMap{|*->*|} f
 | |
| cata :: (u:(f .a) -> .a) -> (Fix u:f) -> .a | gMap{|*->*|} f
 | |
| ana :: (.a -> u:(f .a)) -> .a -> (Fix u:f) | gMap{|*->*|} f
 | |
| 
 |