User loginNavigation 
Defining recursive function as a monad (or other solutions)Is it possible to create recursive function using monads in a functional language? definition of monad in a functional language should look like: " The reason I'm asking is that I'm defining a language where functions are passed around together with applied parameters. If I repeatedly call a function by a recursion, new data sums with previous data that was there before the recusion was applied. So finally I'd get a set of all intermediate results, while I'm interested only in the final result. I'm not even sure if monads would work in this environment with data stitched to function calls. Actually, a solution I can use is first to create a set of parameters of each recursion step, and then to call some kind of fold function over the set that produces a single result. But I want to explore other possibilities, so I'm interested in monadic or other solutions. Thank you for your time. By Ivan Vodišek at 20161211 19:56  LtU Forum  previous forum topic  next forum topic  other blogs  4374 reads

Browse archivesActive forum topics 
Recent comments
6 hours 53 min ago
10 hours 35 min ago
14 hours 19 min ago
16 hours 39 min ago
17 hours 15 sec ago
17 hours 18 min ago
18 hours 33 min ago
19 hours 1 min ago
19 hours 8 min ago
19 hours 14 min ago