maybeEmpty can be replaced by Data.List.listToMaybe
This commit is contained in:
		
							parent
							
								
									ebc0d54ddc
								
							
						
					
					
						commit
						e2ecf0739d
					
				
					 1 changed files with 0 additions and 5 deletions
				
			
		|  | @ -4,11 +4,6 @@ module Hash2Pub.Utils where | |||
| import qualified Data.ByteString as BS | ||||
| import qualified Data.Set        as Set | ||||
| 
 | ||||
| -- |wraps a list into a Maybe, by replacing empty lists with Nothing | ||||
| maybeEmpty :: [a] -> Maybe [a] | ||||
| maybeEmpty []           = Nothing | ||||
| maybeEmpty nonemptyList = Just nonemptyList | ||||
| 
 | ||||
| -- | Chop a list into sublists of i elements. The last sublist might contain | ||||
| -- less than i elements. | ||||
| chunksOf :: Int -> [a] -> [[a]] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue