11
votes
2answers
621 views

Functional programming and stateful algorithms

I'm learning functional programming with Haskell. In the meantime I'm studying Automata theory and as the two seem to fit well together I'm writing a small library to play with automata. Here's the ...
2
votes
1answer
164 views

Strategy for normalising and interpreting location data

I'm a bit stuck with a problem involving the normalisation of location input data from the user (which comes from a third party). Aim To logically breakdown and interpret the user location input ...
10
votes
1answer
428 views

Functional Reactive/Relational Programming – Is there a difference?

I've been using Reactive Cocoa (by GitHub), a Functional Reactive Programming API for use with the Cocoa libraries for a while now, but have just read "Out of the Tar Pit", the paper that supposedly ...
2
votes
2answers
583 views

Ring of numbers where adjacent entries sum up to a prime

Given a number n, find a permutation of the numbers 1...n such that all adjacent entries sum up to primes. If such a permutation does not exist, throw an error. Is there a purely-functional way to do ...
1
vote
1answer
109 views

Permuting a list of numbers by pushing and popping onto a stack

Suppose we have some long stack of numbers. There is another intermediate stack, and a destination stack to be returned in the end. The only two operations allowed is transferring the top of the old ...
0
votes
1answer
143 views

LOOP program only need inc and zero

I have 4 different commands in LOOP programming language: y=Zero() y=Val(x)=copy x and put it in register y y=Inc(x)=x+1 y=Dec(x)=x-1 Finally I also have loop n times { ... ...
2
votes
1answer
150 views

LOOP-computable functions

I was just reading a chapter about LOOP-computable functions and I have the following question: Is it possible to numerate every LOOP program with an algorithm? Formally: Is it possible to have a ...
1
vote
2answers
193 views

Sorting : Useful for more than just viewing data?

Context I'm currently working on a personal project involving functional reactive JavaScript, and I've come up with an odd question. Note that this question is not JavaScript specific, but that is ...
11
votes
5answers
303 views

Convert list of 24-hour-precipitation values into total-by-hour

Let's say I have a list of precipitation values by hour, each showing how much rain happened in the prior 24 hours, ordered by date. For example: { '2012-05-24 12:00': 0.5, // .5" of rain from ...
2
votes
4answers
914 views

Resources for learning common algorithms by Lisp [closed]

Many books about algorithms and data structures are coded by imperative languages. Is there any book that can show functional programming languages can do the same thing or do them better? In ...
8
votes
11answers
2k views

Is Object Oriented stuff really that important? [closed]

For years, I have been doing Algorithmic stuff, writing scalable data structures for internet search, for example Randomized Binary Search Trees for Auto Recommendation, BitMaps, Wisdom of Crowd based ...