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
“With this wonderful piece of modern medical technology, we are able to laugh in the face of death, then spit in it, make obscene phone calls to his wife three in the morning, steal his newspaper and shit on his porch. With science. ( ed. SCIENCE!!! )”— txt clipping on my desktop. no clue where it came from. i blame the internet. 41.1 kilobytes.
I like music, but not really. It’s more I like the sound of insturments together; more of a meta music. also, I like noise and my friends and I are in a band and we play noise. ‘cause noise is the next step in musical evoloution. noise.