Comment by vidarh

Comment by vidarh 9 hours ago

0 replies

This is your example in Ruby:

    isLarge = -> {|a| a > 100 }

    numbers.filter(&isLarge)
Or you could replace the first line:

    isLarge = -> { _1 > 100 }
Some people hate that syntax, though. I think for trivial predicates like this, it's fine.