Project

General

Profile

Actions

Feature #6242

closed

Ruby should support lists

Added by shugo (Shugo Maeda) about 12 years ago. Updated about 1 year ago.

Status:
Rejected
Assignee:
-
Target version:
[ruby-core:44036]

Description

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


Files

list.diff (9.61 KB) list.diff shugo (Shugo Maeda), 04/01/2012 12:17 PM
list2.diff (9.61 KB) list2.diff shugo (Shugo Maeda), 04/01/2012 02:10 PM
list3.diff (14 KB) list3.diff shugo (Shugo Maeda), 04/01/2012 11:14 PM
noname (500 Bytes) noname Anonymous, 04/02/2012 10:59 AM
noname (500 Bytes) noname Anonymous, 04/02/2012 11:23 AM
jaro-1.jpg (12.3 KB) jaro-1.jpg rohansoni619 (Rohan Soni), 06/08/2013 02:20 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0