07:11
I've come up with a better generator element for vyxal v3
Ṣ<relation>|<initial terms>;
For example: k≈Ṣ+
is all Fibonacci numbers
because it’s saying that each term is the sum of the last two terms
because the stack for each number generated starts with all previous terms on it
it would be a structure type instead of a lambda because n and m would refer to the last term and second last term respectively
actually that reminds me to mention that I’m planning on making m also be a context variable
but instead of referring to arguments, it refers to indexes/iteration counts/etc
@lyxal this is different to lambda types which have n as the current argument and m as the argument index
I also have another structure idea that could be useful
Ḍ<predicate>|<container>;
Which is, does there exist an item in container such that predicate returns true
it would be helpful for decision problems
because instead of filtering by a function and then checking if it’s empty, you just use this structure instead
for example, this structure would allow for a theoretical 6 byte answer to the “is it a concatenation of two squares” challenge
Which is, from all the ways to split the input into two consecutive items, does there exist an item such that all items in that item are square?
The characters used are all subject to change
Because these are simply demonstrations of some ideas I’ve come up with
and I didn’t mention it earlier, but if only one branch is provided to these structures, it takes the second branch (initial terms / container) from the stack
but if the second branch is provided, it is evaluated in lambda like conditions
as in, it’s run on its own stack with contextual variables and stuff
But i don’t know what the contextual variables would refer to in that case
maybe the top of the stack without popping it
idk the finer details yet, this is just brainstorming at this point
I’ve also had the idea to have elements for things like ?<swap>
and ?n
basically shorthand forms of when you want to have the input followed by either what was originally top of stack or the context variable