lib/jsi/util.rb in jsi-0.2.0 vs lib/jsi/util.rb in jsi-0.2.1

- old
+ new

@@ -66,9 +66,15 @@ else object end end + # @param object_group_text [Array<String>] + # @return [String] + def object_group_str(object_group_text) + object_group_text.compact.map { |t| " #{t}" }.join('') + end + # this is the Y-combinator, which allows anonymous recursive functions. for a simple example, # to define a recursive function to return the length of an array: # # length = ycomb do |len| # proc{|list| list == [] ? 0 : 1 + len.call(list[1..-1]) }