about summary refs log tree commit diff
path: root/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-filter.exp
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2022-09-23T00·14+0300
committertazjin <tazjin@tvl.su>2022-09-23T09·55+0000
commitf816813d41271043473f8740bbc8c257f9b54982 (patch)
treec75bf935076036c131d40958026f3a220319a2e3 /tvix/eval/src/tests/tvix_tests/eval-okay-builtins-filter.exp
parent1015f2f8e7c37c5c4b4ebca799579c5f6c0d5100 (diff)
feat(tvix/eval): implement 'builtins.filter' r/4963
This is a little ugly because the plain Iterator::filter method can
not be used (it does not support fallible primitives), so we need to
resort to an `Iterator::filter_map` and deal with the wrapping in
Options everywhere.

This prevents use of `?` which introduces the need for some matching,
but it's not *too* bad.

Change-Id: Ie2c3c0c9756c4c627176f64fb4e0054e717c26d1
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6765
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'tvix/eval/src/tests/tvix_tests/eval-okay-builtins-filter.exp')
-rw-r--r--tvix/eval/src/tests/tvix_tests/eval-okay-builtins-filter.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-filter.exp b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-filter.exp
new file mode 100644
index 0000000000..fb94ebaa49
--- /dev/null
+++ b/tvix/eval/src/tests/tvix_tests/eval-okay-builtins-filter.exp
@@ -0,0 +1 @@
+[ [ 1 2 3 4 5 ] [ ] [ 2 2 2 ] [ [ 1 2 ] [ 3 4 ] ] ]