FunctionalArrayList class implemented