Help for this page

Select Code to Download


  1. or download this
    greeting('Woah'); # Waits
    ...
    greeting('Nelly'); # prints now that it has both arguments
    
  2. or download this
        greeting verb object = putStrLn (verb ++ ", " ++ object)
    
  3. or download this
        greeting :: String -> String -> IO ()
    
  4. or download this
        greeting :: String -> ( String -> IO () )
    
  5. or download this
        greeting "Hello" "World"
        (greeting "Hello") "World"
        ((greeting) "Hello") "World"
    
  6. or download this
        greeting "Hello" "World" :: IO ()
        greeting "Hello"         :: String -> IO ()
        greeting                 :: String -> String -> IO ()
    
  7. or download this
        sub foo { print "@_" }
    
  8. or download this
        (-) 2 1            ==>  1
        flip (-) 2 1       ==> -1
    
        dec1 = flip (-) 1
        dec1 2             ==> 1