repl.it
@anonymous/

PrettyDenseAggregators

Haskell

No description

fork
loading
Files
  • main.hs
main.hs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{-# LANGUAGE LambdaCase #-}

import System.Directory

fp = "/etc/passwd"

b = doesFileExist fp

main = do
    b >>= \case
        True ->  putStrLn "Yes"
        False -> putStrLn "No"
    lines <- readFile fp
    putStr lines
GHCi, version 8.6.5