Bottles of Beer Methods

We compute a few verses of the Bottles of Beer song using Method paragraphs as both producers and consumers of data values. First we define some quantities through givens and simple operations on them.

For example: a cell is any ordered pair of nouns.

99 Bottles of Beer on the Wall -1 Take One Down Pass it Around SUM Bottles of Beer on the Wall -1 Take One Down Pass it Around SUM Bottles of Beer on the Wall

Then we retrieve values following wiki-centric scoping rules and continue the calculation. A noun is a bottle or a beer. A beer is any natural number.

Bottles of Beer on the Wall -1 Take One Down Pass it Around SUM Bottles of Beer on the Wall

Double-click a method to see what lines were used to create it.

Beer Constants

We can retrieve values from some data objects. For example, we can retrieve the first row of a dropped csv by citing the column header of the desired value.

We parametrize the last few verses of our song by citing a data for a Few or a Bunch of bottles. This is the fast way to get this tedious song finished.

Bottles of Beer on the Wall Take a Few Down SUM Bottles of Beer on the Wall Take a Few Down Take a Bunch Down SUM Bottles of Beer on the Wall

Note: More likely computations will be spread among a number of related pages. The computation performed will depend on the selection of pages and the order they appear.

Caution: We have yet to make the order of operations within methods reliably deterministic. If you see errors or unexpected values try refreshing the page.

DOT strict digraph rankdir=LR node [style=dotted fillcolor=lightyellow penwidth=dotted color=blue fontname="Sans-serif"] HERE NODE node [style=dotted fillcolor=bisque] WHERE /^Next/ LINKS HERE -> NODE node [style=dotted fillcolor=white] HERE NODE WHERE /^Next/ LINKS HERE -> NODE node [style=dotted fillcolor=white penwidth=3 color=bisque] LINKS HERE -> NODE node [style=dotted fillcolor=white penwidth=1 color=orange] HERE NODE LINKS HERE -> NODE node [style="filled,rounded,dotted" fillcolor=white] edge [style=dotted] HERE NODE BACKLINKS NODE -> HERE STATIC strict digraph {rankdir=RL node [style=dotted fillcolor=lightyellow penwidth=dotted color=blue fontname="Sans-serif"] "Nock" node [style=dotted fillcolor=bisque] node [style=dotted fillcolor=white penwidth=3 color=bisque] "Nock" -> "0" "Nock" -> "0" node [style=dotted fillcolor=white penwidth=1 color=orange] "0" "0" -> "1" "0" -> "3" "0" -> "15" node [style=dotted fillcolor=white penwidth=1 color=orange] "0" "0" -> "1" "0" -> "3" "0" -> "15" node [style="filled,rounded,dotted" fillcolor=white] edge [style=dotted] "Nock"}