Git Product home page Git Product logo

Comments (3)

ekmett avatar ekmett commented on August 28, 2024

The main reason to consider favoring Twan's approach and the reason that I did so originally was that it gave you immedate access to the 'next' instruction at the root. If you left associate to Ørjan's version then you have to walk under /n/ Ap nodes to figure out what you're doing next. With Twan's you can see the 'next' instruction in /O(1)/ when walking left to right, which is most common. Of course, not everything works left to right like a parser or pretty printer, but a lot of things do

from free.

UnkindPartition avatar UnkindPartition commented on August 28, 2024

Sounds fair. I'll update the article with this consideration.

I'm not too concerned about which implementation ends up in the free package — it's not a big deal to copy&paste those 15 lines when I need them.

from free.

roconnor avatar roconnor commented on August 28, 2024

Based on my work on Kleene Stores, I eventually settled on the Applicative instance using flip as the "forward" version and the one with compose was "backwards". This is in part corroborated by the fact that using the compose version with the Backwards applicative is not as lazy as using the flip version directly. Assuming the Free Applicative is analogous to Kleene Store, then I'd argue that Twan's version is the natural direction.

from free.

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.