head/tail extraction 2 lines -> 1 in ex2_18.coffee