flatten in ruby and clisp