mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 01:01:59 +03:00
9 lines
282 B
Idris
9 lines
282 B
Idris
%foreign "scheme,racket:(lambda (x) (if (port-number? x) 1 0)),racket/tcp"
|
|
isPortNumber : Int -> Bool
|
|
|
|
main : IO ()
|
|
main = do
|
|
putStrLn $ "0 is port: " ++ show (isPortNumber 0)
|
|
putStrLn $ "1 is port: " ++ show (isPortNumber 1)
|
|
putStrLn $ "2 is port: " ++ show (isPortNumber 2)
|