annotate samples/logical.tp @ 253:697c2c562af2

Fix infinite loop in hash dict
author Michael Pavone <pavone@retrodev.com>
date Sat, 31 May 2014 21:27:03 -0700
parents 59a94f3ad56f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
97
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #{
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 foo <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 print: "foo\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 true
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 bar <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 print: "bar\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 false
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 baz <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 print: "baz\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15 true
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
16 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
18 qux <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
19 print: "shouldn't be printed\n"
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
20 true
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
21 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
22
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
23
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
24 main <- {
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
25 foo && bar || (baz || qux)
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
26 }
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
27
59a94f3ad56f Added short-circuit && and || operators
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
28 }