Skip to content

Instantly share code, notes, and snippets.

@notyy
Created July 15, 2012 23:51
Show Gist options
  • Save notyy/3119266 to your computer and use it in GitHub Desktop.
Save notyy/3119266 to your computer and use it in GitHub Desktop.
scala_lecture,ruby comparation
def postProcess int_list
int_list.each{|l| puts l}
end
list = [1,2,3,4,5]
rs = list.map{ |i| i * 2 }.map{ |i| i + 3 }.reject{|j| j > 10}
postProcess(rs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment