Debian Codegraph @

doc/_includes/examples/sours.jsonnet

raw
1 // This function returns an object. Although
2 // the braces look like Java or C++ they do
3 // not mean a statement block, they are instead
4 // the value being returned.
5 local Sour(spirit, garnish='Lemon twist') = {
6 ingredients: [
7 { kind: spirit, qty: 2 },
8 { kind: 'Egg white', qty: 1 },
9 { kind: 'Lemon Juice', qty: 1 },
10 { kind: 'Simple Syrup', qty: 1 },
11 ],
12 garnish: garnish,
13 served: 'Straight Up',
14 };
15
16 {
17 'Whiskey Sour': Sour('Bulleit Bourbon',
18 'Orange bitters'),
19 'Pisco Sour': Sour('Machu Pisco',
20 'Angostura bitters'),
21 }