[[!toc levels=2]]
+More details are also available on these [[two|/rosetta2]] [[pages|/rosetta3]]. (But some information is only discussed below; the others aren't supersets of this page.)
+
## Can you summarize the differences between your made-up language and Scheme, OCaml, and Haskell? ##
The made-up language we wet our toes in in week 1 is called Kapulet. (I'll tell you [the story behind its name](/images/randj.jpg) sometime.) The purpose of starting with this language is that it represents something of a center of gravity between Scheme, OCaml, and Haskell, and also lacks many of their idiosyncratic warts. One downside is that it's not yet implemented in a form that you can run on your computers. So for now, if you want to try out your code on a real mechanical evaluator, you'll need to use one of the other languages.
( - 2) # ( - 2) 10 == 8
(0 - )
( - ) (5, 3)
-
+
and here are their translations into natural Haskell:
| 1 -> result1
| x -> resultx
+<a id=as-patterns></a>
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
pat1 match expr1;
...
in ... # rest of program or library
-
+
That is, the bindings initiated by the clauses of the `let` construction remain in effect until the end of the program or library. They can of course be "hidden" by subsequent bindings to new variables spelled the same way. The program:
# Kapulet