From b1b3498fa8a621ba0d9a6a00d6d83d8ef4998027 Mon Sep 17 00:00:00 2001 From: jim Date: Sat, 7 Feb 2015 10:04:13 -0500 Subject: [PATCH] update for rename of topics/week1_advanced_notes.mdwn to topics/week1_kapulet_advanced.mdwn --- rosetta1.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rosetta1.mdwn b/rosetta1.mdwn index bd2da5a3..fa189586 100644 --- a/rosetta1.mdwn +++ b/rosetta1.mdwn @@ -158,7 +158,7 @@ Here the last displayed line will fail, because `add` expects as its argument a Kapulet essentially works like OCaml and Haskell; though for pedagogical reasons we started out by introducing uncurried definitions, rather than the *curried* definitions those other languages predominantly use. -[[As we mentioned in the course notes|topics/week1_advanced_notes#sections]], in Kapulet, OCaml, and Haskell, there is a shorthand that enables you to write things like: +[[As we mentioned in the course notes|topics/week1_kapulet_advanced#sections]], in Kapulet, OCaml, and Haskell, there is a shorthand that enables you to write things like: # Kapulet let @@ -446,7 +446,7 @@ Kapulet's `dup` isn't predefined in Haskell but can be easily expressed as `\x - These are the same in Kapulet and Haskell (modulo the differences between [[Kapulet's multivalues|topics/week1_kapulet_intro#lightweight]] or "lightweight tuples" and Haskell's tuples): `id`, `const`, `flip`, `curry`, `uncurry`. None of these are predefined in OCaml. -Kapulet and Haskell both have `( $ )`, which was explained [[in the course notes|topics/week1_advanced_notes#dollar]]. OCaml expresses this as `( @@ )`. (OCaml also uses `|>` to express the converse operation: `f x`, `f @@ x` and `x |> f` all mean the same.) +Kapulet and Haskell both have `( $ )`, which was explained [[in the course notes|topics/week1_kapulet_advanced#dollar]]. OCaml expresses this as `( @@ )`. (OCaml also uses `|>` to express the converse operation: `f x`, `f @@ x` and `x |> f` all mean the same.) @@ -492,7 +492,7 @@ Note there is no closing `end` or `}`. You can enclose the whole expression in p | 1 -> result1 | x -> resultx -The syntax for [[guards|topics/week1_advanced_notes#guards]] and [[as-patterns|topics/week1_advanced_notes#as-patterns]] also only varies slightly between these languages: +The syntax for [[guards|topics/week1_kapulet_advanced#guards]] and [[as-patterns|topics/week1_kapulet_advanced#as-patterns]] also only varies slightly between these languages: # Kapulet case some_expression of @@ -791,7 +791,7 @@ Haskell's "toplevel interpreter" (ghci) permits a syntactic form that looks supe let x = 2 x -but under the covers something quite different is happening. (Specifically, you're working "inside the IO Monad", except that in this special context, expressions like `x` that don't evaluate to monadic values are permitted and evaluated. We don't expect that you will understand yet what any of this means.) If you're writing *in a file* that you want Haskell to interpret or compile, on the other hand, you have to do something a bit different (which you can't easily also do at the toplevel in ghci). [[Recall|topics/week1_advanced_notes#funct-declarations]] the shortcut by which we permitted: +but under the covers something quite different is happening. (Specifically, you're working "inside the IO Monad", except that in this special context, expressions like `x` that don't evaluate to monadic values are permitted and evaluated. We don't expect that you will understand yet what any of this means.) If you're writing *in a file* that you want Haskell to interpret or compile, on the other hand, you have to do something a bit different (which you can't easily also do at the toplevel in ghci). [[Recall|topics/week1_kapulet_advanced#funct-declarations]] the shortcut by which we permitted: # Kapulet let -- 2.11.0