File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change 21
21
22
22
// Complete implementation of a command line tool
23
23
@main struct Describe: ParsableCommand {
24
- @Argument(help: "The values to describe.")
25
- var values: [Double] = []
26
-
27
- mutating func run() {
28
- values.sort()
29
- let total = values.reduce(0, +)
24
+ @Argument(help: "The values to describe.")
25
+ var values: [Double] = []
30
26
31
- print("""
32
- Smallest: \(values.first, default: "No value")
33
- Total: \(total)
34
- Mean: \(total / Double(values.count))
35
- """)
36
- }
27
+ mutating func run() {
28
+ values.sort()
29
+ let total = values.reduce(0, +)
30
+
31
+ print(
32
+ """
33
+ Smallest: \(values.first, default: "No value")
34
+ Total: \(total)
35
+ Mean: \(total / Double(values.count))
36
+ """)
37
+ }
37
38
}
38
39
39
40
- title : Safe
You can’t perform that action at this time.
0 commit comments