diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2023-03-04 01:19:17 -0800 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2023-03-04 01:21:14 -0800 |
| commit | 2127b746f0eecb657b31653ad5967623f994cbaf (patch) | |
| tree | 9df6e054410102ed620aae7b497f0dce66b6efc3 /examples | |
| parent | f52050d53e698975d6598da86ddd99100ae70fdf (diff) | |
added any(), all(), one(). replaced not() with none()
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/boolean.pcdt | 2 | ||||
| -rw-r--r-- | examples/boundedrecursion.pcdt | 2 | ||||
| -rw-r--r-- | examples/while.pcdt | 5 |
3 files changed, 7 insertions, 2 deletions
diff --git a/examples/boolean.pcdt b/examples/boolean.pcdt index de6f04f..553a602 100644 --- a/examples/boolean.pcdt +++ b/examples/boolean.pcdt @@ -9,7 +9,7 @@ if(res print("equals") ) -if(not(res) +if(none(res) print("does not equal") ) diff --git a/examples/boundedrecursion.pcdt b/examples/boundedrecursion.pcdt index 12981da..bbe4194 100644 --- a/examples/boundedrecursion.pcdt +++ b/examples/boundedrecursion.pcdt @@ -2,7 +2,7 @@ store(1000, "maxSize"); store( ref(( print(arg0); - if(not(eq(arg0, maxSize)) + if(none(eq(arg0, maxSize)) incFunc(sum(1, arg0)); ) )); diff --git a/examples/while.pcdt b/examples/while.pcdt new file mode 100644 index 0000000..7a267fc --- /dev/null +++ b/examples/while.pcdt @@ -0,0 +1,5 @@ +store(0, "i") +while(none(eq(i, 10)), ( + print(i); + update(sum(i, 1), "i") +)) |
