内置辅助函数
有几个新的辅助函数被提出来定位问题和冲突。
替换 _|_
:
error
来启动用户定义消息isconcrete
和exist
来测试或比较
验证器:
must(expr)
passes ifexpr
evaluates totrue
and fails otherwisenot(expr)
passes if unified with a valuex
for whichexpr&x
fails andfalse
otherwise.numexist(count, ...expr)
passes if the number of expressions for whichexists(x)
evaluates totrue
unifies withcount
.numconcrete(count, ...expr)
passes if the number of expressions for whichisconcrete(x)
evaluates totrue
unifies withcount
.numvalid(count, ...expr)
passes if the number of expressions for whichisvalid(x)
evaluates totrue
unifies withcount
.
其他:
manifest(x)
evaluatesx
stripping it of any optional fields and definitions and disambiguating disjunctions after their removal.range(from, to, by)
creates a stream of values like found in other languageshead([...])
returns the first element of a list- Package
std
would namespace all core builtins under thestd
package name.
可以通过 core builtin extensions 查看更多细节。