feat(tvix/eval): Support builtins.lessThan
Extend and export the `cmp_op`, and this becomes trivial. Change-Id: I9c93fa4db0f5a1fc8b56928ea144676f79247de1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6557 Autosubmit: wpcarro <wpcarro@gmail.com> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
This commit is contained in:
parent
9e16d70809
commit
890bbf9b1f
4 changed files with 41 additions and 13 deletions
|
|
@ -0,0 +1 @@
|
|||
[ true true true true false false false false true true true true false ]
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
(builtins.lessThan 2 3)
|
||||
(builtins.lessThan 2.0 3)
|
||||
(builtins.lessThan 2 3.0)
|
||||
(builtins.lessThan 2.0 3.0)
|
||||
(builtins.lessThan 3 2)
|
||||
(builtins.lessThan 3.0 2)
|
||||
(builtins.lessThan 3 2.0)
|
||||
(builtins.lessThan 3.0 2.0)
|
||||
(builtins.lessThan 10 (builtins.add 9 2))
|
||||
(builtins.lessThan (builtins.add 9 1) 11)
|
||||
(builtins.lessThan (builtins.add 9 1) (builtins.add 9 2))
|
||||
(builtins.lessThan "a" "b")
|
||||
(builtins.lessThan "b" "a")
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue