From: "drbrain (Eric Hodel)" Date: 2012-04-02T10:39:10+09:00 Subject: [ruby-core:44050] [ruby-trunk - Feature #6242] Ruby should support lists Issue #6242 has been updated by drbrain (Eric Hodel). shugo (Shugo Maeda) wrote: > But the following comment reminded me that Ruby was originally Smalltalk, not a LISP. > > http://www.jwz.org/blog/2012/03/haters-gonna-hate-tail-call-optimization/#comment-103406 > > I'm afraid this issue might be rejected. Maybe we should propose a free ":" after method names for keyword arguments in a separate issue, like: open: "file.txt", mode: "r+", encoding: Encoding::UTF_8 do |io| # ��� end Then we can have the best of LISP and Smalltalk ---------------------------------------- Feature #6242: Ruby should support lists https://bugs.ruby-lang.org/issues/6242#change-25580 Author: shugo (Shugo Maeda) Status: Open Priority: Normal Assignee: Category: Joke Target version: 2.0.0 I've heard that Ruby is a LISP. LISP stands for "LISt Processing." Hence, Ruby should support lists. I've attached a patch to add the classes List and Cons, and the cons operator `:::'. Example: >> S[1,2,3].inject(:+) => 6 >> S[1,2,3] => S[1, 2, 3] >> 0 ::: S[1,2,3] => S[0, 1, 2, 3] >> 0 ::: 1 ::: 2 ::: 3 ::: nil => S[0, 1, 2, 3] >> S[1,2,3].inject(:+) => 6 -- http://bugs.ruby-lang.org/