124 chars4 lines
In the above code snippet, we are using List.fold_left
to calculate the sum of elements in the numbers
list.
main.rb94 chars4 lines
In the above Ruby code snippet, we are using inject
method to achieve the same result as in the OCaml example.
main.rb0 chars1 lines
gistlibby LogSnag