farmer
farmer copied to clipboard
Define For method in arm {}

Doing this would also remove the need for add_resources.
I don't know if this is possible though - calling custom operations within a For method.
If you do For, then also please do If
Yes, you can call custom operations after a for method. This is how things like query expressions work. I’ve discussed it a bit here. Or I’ve misunderstood the question!
@panesofglass ok, good to know it's possible :-) Is there any example you can point me to? I don't even know what the signature of For should look like, let alone how to hook it into the CE and update the internal state.
Looks like you want an actual for loop, so you will need to do something like this, which requires additional members.
Iirc, supporting if just means you have to implement Delay, and possibly Combine. However, sometimes mixing standard members with custom operations requires you wrap each in its own expression.

Let me know if you want to pair on this or need help.
Yes and yes :-) Maybe wednesday?
Doh! Looks like I missed the window. How about Friday morning? I'll be online early.
@panesofglass I've enjoyed your CE workshop, found earlier by random googling. Thank you!
Having chatted with @panesofglass, I don't think this will easily be possible. We could potentially yield within add_resources but I'm not sure what the use case or benefit that would justify the cost of doing this.
I may still try this again. There should be some solution that should work here, though it may not be as lovely as you'd like.
I don't see what value does it bring - generating resources outside of the CE is already possible, unless you somehow benefit from CE context (for example let! within if/for expression).
I think the main benefit might be that we wouldn't need to create single and collection versions of keywords e.g. add_secret and add_secrets.
Closing due to inactivity