WebCHURCH - CheatSheet

last revision 2015/03/14 - feedback is welcome: claus.moebus(at)uni-oldenburg.de -

When working through the WebCHURCH-Tutorial Probabilistic Models of Cognition my impression is that the official documentation is only partial compatible with the tutorial. Furthermore, some WebCHURCH-procedures are not compatible with the SCHEME R6RS-Standard (e.g. 'apply', 'case').

Most expressions are evaluated according applicative-order. When expressions are evaluated according normal-order (= delayed or lazy evaluation) this is mentioned explicitly.

My doc is based on:
1. the WebCHURCH doc
2. the Revised6 Report on the Algorithmic Language Scheme - R6RS
3. Dybvig, The Scheme Programming Language, MIT Press, 2009, 4/e
4. Scott, Programming Language Pragmatics, Morgan Kaufman, 2009, 3/e
5. Lunn et al., The BUGS Book - A Practical Introduction to Bayesian Analysis - , CRC Press, 2013

Math Ops

(+ val …)

(- val …)

(* val …)

(/ val …)

(< val1 val2 …)

(<= val1 val2 …)

(= val1 val2 …)

(> val1 val2 …)

(>= val1 val2 …)

A

(and expr …)

(append lst1 lst2 …)

(apply proc obj …)

B

(binomial p n)

C

(case key case-clause …)

D

(define variable expression)

(define (variable parameter …) body )

(density list {string})

(display expr)

E

(equal? obj1 obj2)

(expt val1 val2)

F

“false” or “#f”

(fifth lst)

(first lst)

(flip {weight})

(flatten nlst)

(fold proc init lst)

(fourth lst)

G

(gaussian mean stdev)

(geometric weight)

H

(hist list {string})

I

(if test consequent {alternate})

J

K

L

(lambda formals body)

(length lst)

(let ((var val) …) expr …)

(list obj …)

M

(map proc list …)

(mem procedure)

(mh-query samples lag defines query-expr condition-expr)

N

(null? lst)

O

(or expr …)

P

(pair obj1 obj2)

(pair? obj)

Q

(quote datum)

'datum is equivalent to (quote datum)

R

(rejection-query defines query-expr condition-expr)

(repeat N procedure)

(rest lst)

S

(second lst)

(seventh lst)

(sixth lst)

(sum lst)

T

(third lst)

“true” or “#t”

U

(uniform-draw list)

V

W

X

Y

Z