add reverse function to get the reverse of an array
add compose function