Coder Social home page Coder Social logo

Comments (17)

forki avatar forki commented on August 15, 2024 1

If you do For, then also please do If

from farmer.

panesofglass avatar panesofglass commented on August 15, 2024 1

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!

from farmer.

vilinski avatar vilinski commented on August 15, 2024 1

@panesofglass I've enjoyed your CE workshop, found earlier by random googling. Thank you!

from farmer.

isaacabraham avatar isaacabraham commented on August 15, 2024

Doing this would also remove the need for add_resources.

from farmer.

isaacabraham avatar isaacabraham commented on August 15, 2024

I don't know if this is possible though - calling custom operations within a For method.

from farmer.

isaacabraham avatar isaacabraham commented on August 15, 2024

@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.

from farmer.

panesofglass avatar panesofglass commented on August 15, 2024

Looks like you want an actual for loop, so you will need to do something like this, which requires additional members.

from farmer.

panesofglass avatar panesofglass commented on August 15, 2024

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.

from farmer.

isaacabraham avatar isaacabraham commented on August 15, 2024

from farmer.

panesofglass avatar panesofglass commented on August 15, 2024

Let me know if you want to pair on this or need help.

from farmer.

isaacabraham avatar isaacabraham commented on August 15, 2024

Yes and yes :-) Maybe wednesday?

from farmer.

panesofglass avatar panesofglass commented on August 15, 2024

Doh! Looks like I missed the window. How about Friday morning? I'll be online early.

from farmer.

isaacabraham avatar isaacabraham commented on August 15, 2024

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.

from farmer.

panesofglass avatar panesofglass commented on August 15, 2024

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.

from farmer.

et1975 avatar et1975 commented on August 15, 2024

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).

from farmer.

isaacabraham avatar isaacabraham commented on August 15, 2024

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.

from farmer.

Tom-Sloboda avatar Tom-Sloboda commented on August 15, 2024

Closing due to inactivity

from farmer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.