Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Data Structures on the fly

Name: Anonymous 2012-06-17 16:27

list = lambda { |*args| (Struct.new :car, :cdr).new args.first, (args[1..-1].empty?? nil, (list.(*args[1..-1]))) }
array = lambda { |*args| args }
def make_list god, *args
god.(*args)
end
x = make_list array, 1,2,3
y = make_list list,  1,2,3

Name: Anonymous 2012-06-17 17:03

>>5

The fact that it is from Japan means nothing
The fact that it's purely object oriented means everything

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List