Created
June 19, 2018 19:17
-
-
Save greydot/b61836d8a7991da1bad37ed4ac4b0584 to your computer and use it in GitHub Desktop.
This file contains 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
{-# LANGUAGE ScopedTypeVariables #-} | |
import Data.IP | |
import Data.IP.RouteTable (IPRTable) | |
import qualified Data.IP.RouteTable as RT | |
import System.Environment (getArgs) | |
main :: IO () | |
main = do [path] <- getArgs | |
nets <- map read . lines <$> readFile path | |
let rt :: IPRTable IPv4 () = RT.fromList $ zip nets (repeat ()) | |
print $ length rt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment