Skip to content

I don’t know why I made this. So, this tiny Swift code assembles the text of the popular Christmas song "The Twelve Days of Christmas".

License

Notifications You must be signed in to change notification settings

jgris/The-Twelve-Days-of-Christmas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

The-Twelve-Days-of-Christmas Swift Playground

I don’t know why I did this. :-) So, this tiny Swift code assembles the text of the popular Christmas song "The Twelve Days of Christmas" .

How to use:

Download and open The-Twelve-Days-of-Christmas.playground

// Who is the sender of the gifts?
let sender = "My true love"

// To whom?
let recipient = "me"

// List of Christmas gifts 
let gifts = ["partridge", "Turtle doves", "french hens", "calling birds", "golden rings", "geese a Laying",
            "swans a swimming", "maids a milking", "ladies dancing", "lords a leaping", "pipers piping", "drummers drumming"]

// Instance of 'ChristmasGifts' struct
var song = ChristmasGifts(gifts, to: recipient, from: sender)

// You can set instance property to 'true'
// if you want to to see numbers in lyrics in their textual representation.
song.numbersAsText = true

// Prints the lyrics to the console
song.doLyrics()

About

I don’t know why I made this. So, this tiny Swift code assembles the text of the popular Christmas song "The Twelve Days of Christmas".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages