Questions tagged [frp]

Functional reactive programming is programming paradigm for reactive programming

441 questions
0
votes
2 answers

Connecting a Netwire network to OpenGL/GLUT Callbacks

As an experiment, I have set up a simulated set of gears attached to a motor and rendered them with OpenGL/GLUT. At the moment the only input to the Wire network is Time. I want to use the keyboard to control the change the speed of the motor. I…
John F. Miller
  • 25,556
  • 8
  • 66
  • 120
0
votes
1 answer

Functional Banana Traveller - Input Handling

This is a sub-problem from my Traveller project. I've put together the rudementary code that will handle input. It works, until I introduce a TChan to the mix. Below is the working code, with an example of how to use it. Then, I will change it and…
Michael Litchard
  • 3,922
  • 2
  • 22
  • 47
-1
votes
1 answer

iterate IO actions and laziness

I would like to write Hangman game https://github.com/fokot/reactive-hangman/blob/master/src/Hangman.hs with seeing list of user actions as lazy stream. My recursive versions works ok (in code runGameRecursively (newGameState "secret")) I got stuck…
user1698641
  • 211
  • 1
  • 11
-1
votes
1 answer

Function that returns one of its argument

I heard it in a podcast, that, there is a function which takes two args, and returns one of them, and it doesn't tell you which one. What's the name of this function? That podcast is about functional reactive programming, and the host itself created…
Not an ID
  • 2,419
  • 1
  • 16
  • 25
-1
votes
1 answer

Emitting events with Bacon.js

I'm learning Bacon.js and I'm very confused as to how I'm supposed to emit events. I have a super-simple example here of events in node.js var events = require('events') var eventEmitter = new events.EventEmitter() eventEmitter.on("add",…
ThomasReggi
  • 42,912
  • 63
  • 199
  • 343
-2
votes
0 answers

How In Essence does Functional Programming do away with the Observer pattern?

This is not a simple question I understand that. Hence, pointers would be well appreciated (or enough) I have tried to decipher multiple posts on here e.g. Why should the observer pattern be…
MaatDeamon
  • 7,821
  • 5
  • 46
  • 96
1 2 3
29
30