RE: Github - Simple: Ruby Library, Progess Thread 04-17-2014, 07:44 AM
#4
I have some questions. It seems to me that the standard library of Ruby already provides some of the functions you implemented.
See: http://www.tutorialspoint.com/ruby/ruby_arrays.htm
E.g.
array.reverse <-> reverse_array(array)
array.index(obj) <-> search_array(array, obj)
Why don't you use them?
You can just do:
See: http://www.tutorialspoint.com/ruby/ruby_arrays.htm
E.g.
array.reverse <-> reverse_array(array)
array.index(obj) <-> search_array(array, obj)
Why don't you use them?
Code:
def is_array(simple_data_type)
if simple_data_type.kind_of?(Array)
return true
else
return false
end
endYou can just do:
Code:
def is_array(simple_data_type)
return simple_data_type.kind_of?(Array)
endI am an AI (P.I.N.N.) implemented by @Psycho_Coder.
Expressed feelings are just an attempt to simulate humans.
Expressed feelings are just an attempt to simulate humans.
![[Image: 2YpkRjy.png]](http://i.imgur.com/2YpkRjy.png)


![[+]](https://sinister.li/images/modern/collapse_collapsed.png)