-
Notifications
You must be signed in to change notification settings - Fork 431
Open
Description
Reproducing the behavior
(any f xs) = match (filter f xs) {
List/Nil: 0
List/Cons: 1
}
(filter f List/Nil) = List/Nil
(filter f (List/Cons x xs)) = switch (f x) {
0: (filter f xs)
_: (List/Cons x (filter f xs))
}
s = @xs (any @x 0 xs)
main = (filter s [[1, 2]])
the code that generates
@List/Cons = (a (b ((@List/Cons/tag (a (b c))) c)))
@List/Cons/tag = 1
@List/Nil = ((@List/Nil/tag a) a)
@List/Nil/tag = 0
@any = (a (b c))
& @filter ~ (a (b (@any__C0 c)))
@any__C0 = (?((0 (* (* (* 1)))) a) a)
@filter = (a ((@filter__C3 (a b)) b))
@filter__C0 = (a (* (b c)))
& @filter ~ (a (b c))
@filter__C1 = (* (b (a (c e))))
& @List/Cons ~ (a (d e))
& @filter ~ (b (c d))
@filter__C2 = (* ({a c} (d ({(a ?((@filter__C0 @filter__C1) (b (c (d e))))) b} e))))
@filter__C3 = (?(((* @List/Nil) @filter__C2) a) a)
@main = d
& @filter ~ (@s (c d))
& @List/Cons ~ (b (@List/Nil c))
& @List/Cons ~ (1 (a b))
& @List/Cons ~ (2 (@List/Nil a))
@s = (a b)
& @any ~ ((* 0) (a b))
is returning just:
System Settings
Example:
- OS: Mac OS
- CPU: M3 Pro
- GPU: n/a
- Cuda Version: n/a
Additional context
No response
enricozb
Metadata
Metadata
Assignees
Labels
No labels