aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevine Lu Linvega <aliceffekt@gmail.com>2023-03-22 20:23:18 -0700
committerGitHub <noreply@github.com>2023-03-22 20:23:18 -0700
commit0a308f58c1863e989b70dfe2f2f4d8e8653cad06 (patch)
tree79bea0680e721b1c5bb27d6bc04d47ee628b86d0
parentfe3a3653d5cc84b64a3ca50b3a535e13b7f99025 (diff)
downloadinpla-0a308f58c1863e989b70dfe2f2f4d8e8653cad06.tar.gz
inpla-0a308f58c1863e989b70dfe2f2f4d8e8653cad06.zip
Update Gentle_introduction_Inpla.md
Diffstat (limited to '')
-rw-r--r--Gentle_introduction_Inpla.md13
1 files changed, 4 insertions, 9 deletions
diff --git a/Gentle_introduction_Inpla.md b/Gentle_introduction_Inpla.md
index 0ecb794..c5b1e1a 100644
--- a/Gentle_introduction_Inpla.md
+++ b/Gentle_introduction_Inpla.md
@@ -360,8 +360,8 @@ We can write it with the abbreviation as well:
![Dup](pic/dup.png)
```
>>> Dup(a1,a2) ~ [Z, S(Z), S(S(Z))];
- (1 interactions, 0.00 sec)
- >>> a1 a2
+ (10 interactions, 0.00 sec)
+ >>> a1 a2;
[Z,S(Z),S(S(Z))] [Z,S(Z),S(S(Z))]
>>> free a1 a2;
>>>
@@ -475,7 +475,7 @@ In interaction rules, attributes are recognised by using variables with a modifi
>>> dup(a1,a2) >< (int i):xs => a1~(i:xs1), a2~(i:xs2), dup(xs1,xs2)~xs;
>>> dup(a1,a2) >< [] => a1~[], a2~[];
>>> dup(a,b) ~ [1,2,3]; // This is also written as: a,b << dup([1,2,3])
- (4 interactions, 0.00 sec)
+ (2 interactions, 0.00 sec)
>>> a b;
[1,2,3] [1,2,3]
>>> free a b;
@@ -484,15 +484,10 @@ In interaction rules, attributes are recognised by using variables with a modifi
-**We should be careful for operations of two attributes on distinct agents**. For instance, we take the following rule of an `add` agent:
+**We should be careful for operations of two attributes on distinct agents**. For instance, we take the following rule of an `add` agent, of course, it works as an addition operation on two attributes:
```
>>> add(result, int b) >< (int a) => result~(a+b);
-```
-
-Of course, it works as an addition operation on two attributes:
-
-```
>>> add(r, 3) ~ 5;
(1 interactions, 0.00 sec)
>>> r;