Sample java, Haskel and JavaScript