umajho / dicexp

Dicexp 是一种表示掷骰的表达式。本仓库代码用于对该表达式求值,并作为该表达式的事实标准。
https://umajho.github.io/dicexp/
MIT License
2 stars 0 forks source link

范围运算符 #8

Open umajho opened 1 year ago

umajho commented 1 year ago

类似 m..nm....nm..=n..=n 这样。

在用于像是 reroll(exp, m..n) 的场景时:

以后有空了再看看吧。

umajho commented 1 year ago

在想,像 \(x -> x <= 5) 这样写的闭包应该可以直接视为范围。 甚至像是 \(x -> x)\(x -> not x) 这样,在当 x 是布尔值时也可以特殊对待? 总之目前是不打算考虑这些事情的。