News for hackers. Stuff that matters.
Re:Study of non-programmers' solutions to programming proble... by ssmoot on Saturday April 16, 2016 @12:01PM (#11511049)

  module Numeric
    def times(&b)
      (1..self).each(&b)
    end
  end
It's really no different than the Scala you'd write for the same thing:

  implicit class LongHelpers(l: Long) {
    def times(f: => Any) = (1L to l) foreach f
  }

  10 times println("here's a line!")
To interpret that as a Set operation would make the definition of a Set operation so broad as to be useless IMO.

There are no comments on this comment yet.