Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6594983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:52:50+00:00 2026-05-25T17:52:50+00:00

I have been researching FRP and found a bunch of different implementations. One model

  • 0

I have been researching FRP and found a bunch of different implementations. One model I have seen is one I will refer to as the ‘Signal’ representation. This essential combines Events and Behaviours into one entity.

Firstly, a Signal is an object thats value is a Behaviour. Secondly, a Signal has an Event ‘stream’ that can be seen and operated on as a standard data structure (you can use ‘each’, ‘map’ and ‘filter’ etc on the Signal to define how Events are reacted to). For example I can do this (where ‘time’ is a Signal representation of time):

time.each { t => print(t) } // every time there is a 'tick' the current time is printed
a = time * 5 //where 'a' would be a dynamic value always up to date with time

Is this representation of FRP correct or are there any problems? I quite like the way this works and also how simple it is to describe personally but I’m not sure its right.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:52:51+00:00Added an answer on May 25, 2026 at 5:52 pm

    Unfortunately, coalescing “event” and “behavior” into a single entity “signal” doesn’t work so well.

    Most signal-based FRP implementations that I know end up creating an additional “event”-like type along the lines of

    type Event a = Signal (Maybe a)
    

    So, the concept of events doesn’t go away, and there is no real simplification. In fact, I would argue that the signal type is a semantic complification. Signals are only popular because they are easier to implement.

    The main argument against signals is that they cannot represent continuous time behaviors, because they have to cater to the discrete events. In Conal Elliott’s original vision, behaviors were simple continuous functions of time

    type Behavior a = Time -> a
    -- = function that takes the current time as parameter and returns
    --   the corresponding value of type  a
    

    In contrast, signals always are always discretized and usually associated with a fixed time step. (It is possible to implement both events and behaviors on top of a variable time step signal, but it’s not a good abstraction by itself.) Compare this to an event stream

    type Event a = [(Time,a)]
    -- list of pairs of the form (current time, corresponding event value)
    

    where the individual events don’t necessarily occur in regularly spaced time intervals.

    The argument for the distinction between behaviors and events is that their API is quite different. The main point is that they have different product types:

    (Behavior a , Behavior b) = Behavior (a,b)
    (Event a    , Event b   ) = Event (a :+: b)
    

    In words: a pair of behaviors is the same as a behavior of pairs, but a pair of events is the same as an event from either component/channel. Another point is that there are two operations

    (<*>) :: Behavior (a -> b) -> Behavior a -> Behavior b
    apply :: Behavior (a -> b) -> Event a    -> Event b
    

    that have almost the same type, but quite different semantics. (The first updates the result when the first argument changes, while the second doesn’t.)

    To summarize: signals can be used for implementing FRP and are valuable for experimenting with new implementation techniques, but behaviors and events are a better abstraction for people who just want to use FRP.

    (Full Disclosure: I have implemented an FRP library called reactive-banana in Haskell.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been researching this one for awhile. I found several resources on the
I have been researching a few different apps lately for my company which are
I have recently been web-researching quantum computing. Will we see these in our lifetimes
I have been researching for this and read different opinions but i wanted to
I have been researching about the headless browsers available till to date and found
I have been researching for the last two hours, and have found nothing. Basically,
I have been researching the JQuery way to add table rows dynamically. One excellent
i have been researching on this topic and havent found any answers yet. Im
I have been researching asynchronous messaging, and I like the way it elegantly deals
I have been researching and playing with functional programming lately, solely to broaden my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.