Scheme functions translated to Javascript