Skip to content

Instantly share code, notes, and snippets.

@mssawant
Created August 24, 2017 11:34
Show Gist options
  • Save mssawant/e5b7e589ec13df6244a9b45fcfa55a40 to your computer and use it in GitHub Desktop.
Save mssawant/e5b7e589ec13df6244a9b45fcfa55a40 to your computer and use it in GitHub Desktop.
Halon exercise
import System.Environment
import Data.Bool
import Data.List
checkchar :: IO Bool
checkchar = do c <- getChar
return (c == 'y')
addList :: Int -> [Int] -> [Int]
addList y (x:xs) = y:xs
main::IO ()
main = do putStrLn "Enter char"
x <- checkchar
if x
then putStrLn "TRUE"
else putStrLn "FALSE"
let l = [1,2]
print $ l
let m = addList 3 l
print $ m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment