summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Bard <github@adambard.com>2013-07-03 23:17:15 -0700
committerAdam Bard <github@adambard.com>2013-07-03 23:17:15 -0700
commit7aa3f02a37fed77958c863e3ced687eb1ca22f5c (patch)
tree9cb246eca0d8e98eb922e3f4c9350d596430e7d3
parent54772928244b17315aee7f252ad2c491fa5f55d5 (diff)
parent3c48fae101bd4c0b1d8db2d7ca2445e04f64ab00 (diff)
Merge pull request #103 from ilyagr/patch-1
Update haskell.html.markdown
-rw-r--r--haskell.html.markdown10
1 files changed, 5 insertions, 5 deletions
diff --git a/haskell.html.markdown b/haskell.html.markdown
index 11109ab8..34df4d08 100644
--- a/haskell.html.markdown
+++ b/haskell.html.markdown
@@ -292,9 +292,9 @@ say Green = "You are Green!"
data Maybe a = Nothing | Just a
-- These are all of type Maybe
-Nothing
-Just "hello"
-Just 1
+Just "hello" -- of type `Maybe String`
+Just 1 -- of type `Maybe Int`
+Nothing -- of type `Maybe a` for any `a`
----------------------------------------------------
-- 8. Haskell IO
@@ -344,8 +344,8 @@ sayHello = do
-- Let's understand better how the function `getLine` we just
-- used works. Its type is:
-- getLine :: IO String
--- You can think of a value of type `IO String` as representing a
--- computer program that will generate a value of type `String`
+-- You can think of a value of type `IO a` as representing a
+-- computer program that will generate a value of type `a`
-- when executed (in addition to anything else it does). We can
-- store and reuse this value using `<-`. We can also
-- make our own action of type `IO String`: