Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with lift #88

Closed
stevekrouse opened this issue Dec 12, 2018 · 4 comments
Closed

Issues with lift #88

stevekrouse opened this issue Dec 12, 2018 · 4 comments
Assignees
Labels

Comments

@stevekrouse
Copy link
Contributor

stevekrouse commented Dec 12, 2018

(I made this issue in Turbine because that's where I'm trying to use lift but I can move this to jabz if you prefer...)

  1. Do I import it from jabz and do lift(f, b1, b2)? Or I use it as b1.lift(f, b2)? It seems like most jabz things are importable from hareactive but not lift. Why is that?

  2. lift doesn't seem to work for 4 behaviors but the documentation says "You can also combine in this fashion any number of behaviors"

  3. lift doesn't work with loop parameters in the second argument spot with error this.fn.last is not a function:

https://codesandbox.io/s/p56qm7lkwj

const timer = loop(
  ({ x }) =>
    function*() {
      const x_ = Behavior.of(1);
      // works
      yield div(lift((a, b) => a + " " + b, Behavior.of(3), x));

      // does not work
      yield div(lift((a,b) => a + " " + b, x, Behavior.of(3)));

      return { x: x_ };
    }
);
@paldepind
Copy link
Member

Do I import it from jabz and do lift(f, b1, b2)? Or I use it as b1.lift(f, b2)? It seems like most jabz things are importable from hareactive but not lift. Why is that?

That's an omission. Hareactive is supposed to be self contained. Jabz is only an optional library that Hareactive intends to play nice with but it should not be required. funkia/hareactive@f273a1a fixes that. Now Hareactive exports its own lift function.

Both 2 and 3 looks like bugs to me.

@paldepind paldepind added the bug label Jan 28, 2019
@stevekrouse
Copy link
Contributor Author

Ok, thanks! Did your recent commit also try to fix the bugs 2 and 3?

@paldepind paldepind self-assigned this Jan 29, 2019
@paldepind
Copy link
Member

funkia/hareactive@2f4c333 should fix bug nr. 3.

@paldepind
Copy link
Member

funkia/hareactive@8e5d576 should fix bug nr. 2.

I'll close this issue for now. If the next release doesn't fix one or more of these problems for you then we'll reopen it 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants