Closed antonmedv closed 4 weeks ago
I couldn't figure out how to make the input accept cmp.Ordered instead of specific types :)
This is one of the limitations of our virtual machine. As we use stack of []any
, information on type is "lost" (can be retrieved via reflection).
For uniq() builtin to work not only with strings, we need to implement a more general approach, probably implementing in in bytecode or in VM.
Implementing uniq() is much ore tricky 👀
Could u pls be more concrete and provide at least signature?)
Fixed in #705
Not sure if usable or not, but I implemented this recently in my own project (source + docs)
I couldn't figure out how to make the input accept
cmp.Ordered
instead of specific types :)and inline below