Commit 2115d9a
committed
jme.isDeterministic looks at the expression of lambda tokens
This isn't *strictly* correct: an anonymous function `a -> random(0,1)` *is* deterministic as an expression that produces a lambda token, but the output of the lambda is not deterministic.
To be really accurate, a lambda should only count as non-deterministic when it's applied, e.g. `i -> random(0,i)` is deterministic but `(i -> random(0,i))(4)` is not. But I'd have to remember that for every function that takes lambdas.
This was the easiest way of ensuring that jme.isDeterministic doesn't think that expressions using non-deterministic lambdas are deterministic, e.g. `map(i->random(i..2i), 0..3)`1 parent 68fd1dc commit 2115d9a
File tree
4 files changed
+9
-0
lines changed- runtime/scripts
- tests
- jme
4 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| 934 | + | |
| 935 | + | |
934 | 936 | | |
935 | 937 | | |
936 | 938 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9754 | 9754 | | |
9755 | 9755 | | |
9756 | 9756 | | |
| 9757 | + | |
| 9758 | + | |
9757 | 9759 | | |
9758 | 9760 | | |
9759 | 9761 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
1517 | 1520 | | |
1518 | 1521 | | |
1519 | 1522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9090 | 9090 | | |
9091 | 9091 | | |
9092 | 9092 | | |
| 9093 | + | |
| 9094 | + | |
9093 | 9095 | | |
9094 | 9096 | | |
9095 | 9097 | | |
| |||
0 commit comments