Open amaster507 opened 1 year ago
And not successful in figuring it out. I thought in the first update, I would update the core by 2, and in the second try, I thought maybe it just increments one at a time. But neither works
Yes, it increments the number by provided value. Here is an example:
collection|test|:q[
find[
eq{value|is_even|:b|true|}
],
update[
inc{value|num|:n|100|}
]
];
I think the problem is the brackets (
. inc
works with {
But I have to work on the error handling. It is not obvious at all :)
Got it.
Maybe should update the documentation to show {...}
instead of (...)
Yes! This is a typo. Thank you
I see you corrected the docs here. I am going to leave this open until we get an example of the inc
operation in the docs and maybe a little more than just set(...)
like possibly set(<root|path>,<number>)
but then it would be good somewhere to define the syntax of <root|path>
and <number>
and then all of that could be hyperlinked in the docs
I am assuming that
inc
increments a number. Is this correct? I am about to try it out.