Coder Social home page Coder Social logo

thunk's Introduction

Thunk

This package provides a way to do laziness in Elxir. Contains functions to build thunks from elixir terms and combinators for more complex computations.

Installation

Available in Hex, the package can be installed by adding thunk to your list of dependencies in mix.exs:

def deps do
  [
    {:thunk, "~> 0.4.0"}
  ]
end

The docs can be found at https://hexdocs.pm/thunk.

thunk's People

Contributors

jakekonrad avatar

Stargazers

Piotr Klibert avatar

Watchers

Piotr Klibert avatar

thunk's Issues

Update package version in Hex

First of all, thanks for writing the lib. I needed to delay the evaluation of certain terms, and manually wrapping and unwrapping them was becoming tedious. I searched for packages that would help with this, checked out a few, but in the end, I decided to use your library, and it worked without issues. Great job!

Now for the problem: the new release, 0.4.0, is not published to hex and hexdocs. This resulted in some confusion on my part when I tried looking for Thunk.suspend source.

I'd like to ask you to push the newer version to Hex. Also, could you write a few words on what incompatible changes there are between 0.3.1 and 0.4.0? By the time I realized there's a newer version, I already used Thunk.suspend, and I see that it gets renamed to Thunk.delay. Are there any other changes in the API that I'd need to deal with when upgrading? Thanks! :)

Possible space leak

To prevent the map function on thunks from changing the value of a thunk unexpectedly the map function spawns a new process so the change can only be observed by processes that receive the updated thunk. This only works without causing a space leak iff processes are garbage collected when no other process have their pid, which upon deeper reflection I do not think happens.

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.