Korjaa updateListBy
This commit is contained in:
		
							parent
							
								
									5862f87add
								
							
						
					
					
						commit
						6ff0765cfb
					
				@ -35,7 +35,7 @@ emptyState = State
 | 
				
			|||||||
updateListBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
 | 
					updateListBy :: (a -> a -> Bool) -> [a] -> [a] -> [a]
 | 
				
			||||||
updateListBy f old new = olds <> news
 | 
					updateListBy f old new = olds <> news
 | 
				
			||||||
    where news = differenceBy f new old
 | 
					    where news = differenceBy f new old
 | 
				
			||||||
          olds = intersectBy f old news
 | 
					          olds = intersectBy f old new
 | 
				
			||||||
 | 
					
 | 
				
			||||||
elemBy :: (a -> b -> Bool) -> a -> [b] -> Bool
 | 
					elemBy :: (a -> b -> Bool) -> a -> [b] -> Bool
 | 
				
			||||||
elemBy = (.) any
 | 
					elemBy = (.) any
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user