“In the truest spirit of usenet I actually have zero idea what I’m talking about and am making all this up, but it does seem reasonable and has the added benefint of possibly even beng true.”—Richard Sexton
“How about this? I’m just thinking out loud here, but hear me out. In realty there was this practice called redlining that prevented black people from owning. Now that was obviously bad, but if applied on hipsters, I think I could be an effective tool.”—Peggy Hill
“Do not let your fire go out, spark by irreplacable spark in the hopeless swamps of the not quite, the not yet, and the not at all, do not let the hero in your soul perish and leave only frustration for the life you deserved, but never have been able to reach. The world you desire can be won, it exists, it is real, it is possible, it is yours.”—Ayn Rand - Atlas Shrugged
If you understand Smalltalk, Can you please explain this to me?
A common use of blocks with arguments is to implement functions to be applied to all elements of a data structure. For example, many objects representing different kinds of data structures respond to the message do:, which takes a single-argument block as its argument. The object that receives a do: message evaluates the block once for each of the elements contained in the data structure. Each element is made the value of the block argument for one evaluation of the block. The following example calculates the sum of the squares of the first five primes. The result is the value of sum.
sum ← 0.
#(2 3 5 7 11) do:[:prime | sum ← sum + (prime * prime)]
The message collect: creates a collection of the values produced by the block when supplied with the elements of the receiver. The value of the following expression is an array of the squares of the first five primes.
#(2 3 5 7 11) collect:[:prime | prime * prime]
The objects that implement these control structures supply the values of the block arguments by sending the block the message value:. A block with one block argument responds to value: bysetting the block argument to the argument of value: and then executing the expressions in the block. For example, evaluating the following expressions results in the variable total having the value 7.
sizeAdder ← [ :array | total ← total + array size].
Fog lifts from the harbor, dawn goes down to day An agent crests the shadows of a nearby alleyway Piles of broken bricks, signposts on the path Every moments points toward the aftermath
Sailors straggle back from their nights out on the town Hopeless urchins from the city gather around Spies from imperial China wash in with the tide Every battle heads toward surrender on both sides
And I am coming home to you With my own blood in my mouth And I coming home to you If it’s the last thing that I do
Bells ring in the tower, wolves howl in the hills Chalk marks show up on a few high windowsills And a rabbit gives up somewhere and a dozen hawks descend Every moment leads toward its own sad end
Ships loosed from their moorings capsize and then they’re gone Sailors with no captains watch a while and then move on And an agent crests the shadows and I head in her direction All roads lead toward the same blocked intersection
I am coming home to you With my own blood in my mouth And I am coming home to you If it’s the last thing that I do
“In the static space of the Architect, He might’ve used a double integral now and then, early in his career, to find volumes under which surfaces who’s equations are know — Masses, moments, centers of gravity. But it has been years since he’s had to do with anything that basic… In the Dynamic Space of the Living Rocket, the double integral has a different meaning. to integrate here is to operate on a rate of change so that time falls away: Change is stilled… ‘Meters per second’ integrates to ‘meters’. the moving vertical is frozen, in space, and timeless. It was never launched. it will never fall.”—Gravity’s Rainbow