summaryrefslogtreecommitdiffhomepage
path: root/haskell.html.markdown
diff options
context:
space:
mode:
authorAlex Grejuc <grejuca@oregonstate.edu>2018-07-10 15:34:42 -0700
committerAlex Grejuc <grejuca@oregonstate.edu>2018-07-10 15:34:42 -0700
commitc421b1bd0d18ab57c88665bd14b289e75724cf37 (patch)
tree182285d154ef2a35fc5da355b18b3691a8d6eb05 /haskell.html.markdown
parent093e6b62a1aae230f965ad8d1ee2ff8a6b128055 (diff)
trimmed loc over 80 chars
Diffstat (limited to 'haskell.html.markdown')
-rw-r--r--haskell.html.markdown6
1 files changed, 3 insertions, 3 deletions
diff --git a/haskell.html.markdown b/haskell.html.markdown
index 6a48b60c..e9ddf54d 100644
--- a/haskell.html.markdown
+++ b/haskell.html.markdown
@@ -125,7 +125,7 @@ fst ("haskell", 1) -- "haskell"
snd ("haskell", 1) -- 1
-- pair element accessing does not work on n-tuples (i.e. triple, quadruple, etc)
-snd ("snd", "can't touch this", "da na na na") -- error! see function below to get around this
+snd ("snd", "can't touch this", "da na na na") -- error! see function below
----------------------------------------------------
-- 3. Functions
@@ -163,7 +163,7 @@ fib 2 = 2
fib x = fib (x - 1) + fib (x - 2)
-- Pattern matching on tuples
-sndOfTriple (_, y, _) = y -- you can use a wild card (_) to bypass naming an unused value
+sndOfTriple (_, y, _) = y -- use a wild card (_) to bypass naming unused value
-- Pattern matching on lists. Here `x` is the first element
-- in the list, and `xs` is the rest of the list. We can write
@@ -210,7 +210,7 @@ foo 5 -- 60
-- to a given parameter. In contrast to standard function application, which
-- has highest possible priority of 10 and is left-associative, the `$` operator
-- has priority of 0 and is right-associative. Such a low priority means that
--- the expression on its right is applied as the parameter to the function on its left.
+-- the expression on its right is applied as parameter to function on its left.
-- before
even (fib 7) -- false