1
1
mirror of https://github.com/idris-lang/Idris2.git synced 2024-12-25 20:51:43 +03:00
Idris2/tests/racket/ffi001/RacketLib.idr

9 lines
282 B
Idris
Raw Normal View History

2023-08-23 13:04:01 +03:00
%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)