-
Notifications
You must be signed in to change notification settings - Fork 55
Tutorial
wangp edited this page Nov 6, 2018
·
19 revisions
Here is a rough outline for a tutorial that I think we could write together on the wiki. Feel free to rearrange into an order makes more sense to you, add new suggestions, or write a page yourself. You don't have to be a Mercury developer! It's a tutorial, it doesn't need to be rigorous. It's a wiki, the writing doesn't need to be high quality.
The expected audience is someone with some or a lot of programming experience, possibly in functional programming languages, probably not proficient in Prolog.
-
- basic program structure
- compiling and running
- brief introduction to state variables
-
- function syntax
- variables
- if-then-else
- recursion
- builtin ints, integer arithmetic
-
Terms and variables
-
- int, float, string, char
- tuples
- state-of-the-world
- type conversion
-
- conjunction, disjunction, negation, true, fail, etc.
-
unification algorithm
-
input and output
- something about purity
- formatted output
- example: read from standard input
- example: reversing words per line
- example: reading/writing files
- example: data terms
-
uniqueness
-
sets
-
processing command line options
-
record syntax
-
user-defined equality and comparison
-
exceptions
-
mutable variables
-
purity
-
trace goals
-
FFI
-
concurrency
-
debugging
-
profiling
-
glossary