Archive for November, 2007

Sequentially: Temporal and Frequency Adverbs for JavaScript

Saturday, November 24th, 2007

Sequentially is a JavaScript library for asychronous programming. It makes it easy to define functions that are called later, or periodically, or that can be called only a certain number of times, or only at a certain frequency.

[code language=”javascript”]
// Call a function f five times in a row
f.only(5).repeatedly()
// Call f five times, at one second intervals
f.only(5).periodically()
// Make a new function g that calls through to f at most five times,
// no matter how often g is called
var g = f.only(5)
// Make a new function g that calls f at most once per minute,


Read the rest of this entry »

Functional Javascript 1.0.2

Sunday, November 11th, 2007

Thanks to everyone who has commented or contributed, praised or pitched in — I’ve released an update to Functional Javascript, with these changes:

New features

- Rhino compatibility. I think — at least it loads now, and a couple of hand tests work; i have yet to port the testing tool. (Credit: Reginald Braithwaite)

Optimizations

- More efficient Array.slice. (Credit: Dean Edwards)
- Memoize Function.lambda. (Credit: henrah)


Read the rest of this entry »