[Haskell-cafe] Is this functional reactive programming

Jake McArthur jake.mcarthur at gmail.com
Tue May 12 11:26:16 UTC 2015


This looks more like self-adjusting computation than functional reactive
programming. There's a lot of good literature on this topic that's pretty
easy to find on Google. Hope this helps!

On 8:36PM, Sun, May 10, 2015 Clinton Mead <clintonmead at gmail.com> wrote:

> What I want to be able to do is something like this:
>
> do
> x <- newSTRef 2
> y <- newSTRef 3
> z <- letSTRef (x + y)
> r1 <- readSTRef z
> writeSTRef x 5
> r2 <- readSTRef z
> return (r1, r2)
>
> This should return (6,15)
>
> The "letSTRef" is what's new. The value it returns can change based on the
> parts that make up it's function changing.
>
> I understand this syntax above isn't going to work (I'd have to use
> applicative at least I'd imagine) but my main question is that does
> something like this exist? Is it functional reactive programming or is it
> something else?
>
> I don't want to be reinventing the wheel if this type of idea is already
> implemented but I haven't recognised it.
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150512/cb837fa9/attachment.html>


More information about the Haskell-Cafe mailing list