exercism

Exercism solutions.
git clone git://code.dwrz.net/exercism
Log | Files | Refs

README.md (3365B)


      1 # Twelve Days
      2 
      3 Output the lyrics to 'The Twelve Days of Christmas'.
      4 
      5 ```text
      6 On the first day of Christmas my true love gave to me: a Partridge in a Pear Tree.
      7 
      8 On the second day of Christmas my true love gave to me: two Turtle Doves, and a Partridge in a Pear Tree.
      9 
     10 On the third day of Christmas my true love gave to me: three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     11 
     12 On the fourth day of Christmas my true love gave to me: four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     13 
     14 On the fifth day of Christmas my true love gave to me: five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     15 
     16 On the sixth day of Christmas my true love gave to me: six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     17 
     18 On the seventh day of Christmas my true love gave to me: seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     19 
     20 On the eighth day of Christmas my true love gave to me: eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     21 
     22 On the ninth day of Christmas my true love gave to me: nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     23 
     24 On the tenth day of Christmas my true love gave to me: ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     25 
     26 On the eleventh day of Christmas my true love gave to me: eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     27 
     28 On the twelfth day of Christmas my true love gave to me: twelve Drummers Drumming, eleven Pipers Piping, ten Lords-a-Leaping, nine Ladies Dancing, eight Maids-a-Milking, seven Swans-a-Swimming, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.
     29 ```
     30 
     31 ## Running the tests
     32 
     33 To run the tests run the command `go test` from within the exercise directory.
     34 
     35 If the test suite contains benchmarks, you can run these with the `--bench` and `--benchmem`
     36 flags:
     37 
     38     go test -v --bench . --benchmem
     39 
     40 Keep in mind that each reviewer will run benchmarks on a different machine, with
     41 different specs, so the results from these benchmark tests may vary.
     42 
     43 ## Further information
     44 
     45 For more detailed information about the Go track, including how to get help if
     46 you're having trouble, please visit the exercism.io [Go language page](http://exercism.io/languages/go/resources).
     47 
     48 ## Source
     49 
     50 Wikipedia [http://en.wikipedia.org/wiki/The_Twelve_Days_of_Christmas_(song)](http://en.wikipedia.org/wiki/The_Twelve_Days_of_Christmas_(song))
     51 
     52 ## Submitting Incomplete Solutions
     53 It's possible to submit an incomplete solution so you can see how others have completed the exercise.