lib/lisp/interpreter/core/functional.rb in lisp-interpreter-0.4.1 vs lib/lisp/interpreter/core/functional.rb in lisp-interpreter-0.4.2
- old
+ new
@@ -69,10 +69,11 @@
value = find_all_values tmp[idx + 1..-1]
funcs.reverse.each do |t|
value = value.to_s unless value.is_a? Array
value = calc_input_val ['(', t, *value, ')']
end
- value
+ is_arr = value.is_a? Array
+ is_arr ? value[0] : value
end
def build_compose_expr(funcs)
expr = ['(', 'x', ')']
funcs.each do |f|