Saturday, January 26, 2013

A scala script that ends before it begins :)

This script ends before it begins thanks to scala 2.10 futures ! This can be quite perturbing if you're new to this programming concept. See futures and promises for more information.

This script contains two general functions, a future select (unfortunately no yet available in scala future api, special thanks to Victor Klang for its help) and an other one asapFuturesProcess that automatically starts a kind of trigger/callback as soon as any new result becomes available.

Simple custom scala collection examples...

Some examples to illustrate how to create custom collection in scala. Those examples inherit all theirs features from scala collections, and of course theirs types are preserved when involved in any kind of operations (filtering, mapping, ...).

github project page, with test cases : custom collection examples project