From function composition to distributed programming