Fork me on GitHub
#missionary
<
2021-11-23
>
ribelo20:11:58

(def r
  (mi/reactor
    (let [>b (mi/signal! (mi/seed (range 0 5)))
          >c (mi/signal! (mi/seed (range 0 5)))]
      (mi/stream! (mi/ap (println (mi/?< (mi/latest vector >b >c))))))))

(def dispose (r prn prn))

ribelo20:11:09

[0 0]
[1 0]
[1 1]
[2 2]
[3 3]
[4 4]

ribelo20:11:19

isn't [1 0] a bug?

leonoel20:11:10

this is not-yet-defined behavior

leonoel20:11:38

I think the right result is just [4 4]

ribelo20:11:38

I don't know, probably yes 🙃

ribelo20:11:07

I just know that this [0 1] doesn't match the rest

ribelo20:11:23

thanks for your quick reply

leonoel20:11:27

yeah [0 1] is clearly wrong here

ribelo20:11:58

it shows that there is still a hope for me, since I notice when it doesn't work as expected

leonoel20:11:18

seed on signal! is arguably contrived, but if you come up with a real-world example where it matters please keep me posted

ribelo20:11:54

it's a coincidence, because I was actually checking "what happens if..."

ribelo20:11:13

I have not yet encountered any inaccuracies in a real-life example

ribelo20:11:48

as far as I could see them