Hacker News new | past | comments | ask | show | jobs | submit login

I'm not sure if your comment was intended as sarcasm, but you can pretty much do this in Ruby.

    myarray.each {|x| func_a(x); func_b(x); puts x }
is equivalent to

    myarray.each do |x|
        func_a(x)
        func_b(x)
        puts x
    end



Yes, I was being sarcastic. That's Haskell.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: