Questions tagged [proc]

In Ruby, Proc objects are blocks of code that have been bound to a set of local variables. Once bound, the code may be called in different contexts and still access those variables.

In Ruby, a Proc (short for procedure) is a block of code, bound to a variable. As is always the way in Ruby, a Proc is an object, and so can be created with the new method, it is generally preferable to use the lambda method.

1023 questions
-5
votes
2 answers

Parsing /proc/maps?

I wrote the following code in C. What I have done so far is open the proc directory and read the processes inside - dictories that did not consist of numerical characters were simply disregarded as I only want to look at the numeric directories.…
user9042207
  • 101
  • 3
  • 10
-5
votes
1 answer

SAS: Logic to subtract two numbers on FIFO basis

I have a problem which I need to implement using SAS PSQL. I have thought of implementing it using macros. I will try to break my problem down into phases. For the first phase I am struck on how do I iterate over rows accessing each cell values…
kus
  • 1
  • 1
-6
votes
1 answer

Calling #[] on a ruby method

Create a method that can be called in this manner some_named_method(string_1, string_2, int_1, int_2)[Integer] I've just learned that if a method is being called like so some_named_method[80] - that method is a Proc / lambda (? still a little unsure…
James
  • 4,927
  • 3
  • 22
  • 27
1 2 3
68
69