Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

Groovy - 140 139 chars

Golfed, influenced by William Barbosa's answerWilliam Barbosa's answer:

s="ock"
i=1
f={->println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

s = "ock"
i = 1
f = { ->
    println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"

Groovy - 140 139 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

s = "ock"
i = 1
f = { ->
    println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"

Groovy - 140 139 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

s = "ock"
i = 1
f = { ->
    println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"
added 12 characters in body
Source Link
Joey
  • 13.2k
  • 2
  • 43
  • 73

Groovy - 140 139 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

s = "ock"
i = 1
f = { ->
    println "${i++}, ${i++}, ${i++} o'clocko'cl$s, ${i++} o'clocko'cl$s rockr$s,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"

Groovy - 140 139 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

i = 1
f = { ->
    println "${i++}, ${i++}, ${i++} o'clock, ${i++} o'clock rock,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"

Groovy - 140 139 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

s = "ock"
i = 1
f = { ->
    println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"
better golf (by 1 measly char)
Source Link

Groovy - 140140 139 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println i+++""${i++}, "+i+++"${i++}, "+i+++"${i++} o'cl$s, "+i+++"${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

i = 1
f = { ->
    println "${i++ + "}, " + ${i++ + "}, " + ${i++ + "} o'clock, " + ${i++ + "} o'clock rock,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"

Groovy - 140 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println i+++", "+i+++", "+i+++" o'cl$s, "+i+++" o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

i = 1
f = { ->
    println i++ + ", " + i++ + ", " + i++ + " o'clock, " + i++ + " o'clock rock,"
}

f();f();f()

println "We're gonna r$s around the clock tonight"

Groovy - 140 139 chars

Golfed, influenced by William Barbosa's answer:

s="ock"
i=1
f={->println "${i++}, ${i++}, ${i++} o'cl$s, ${i++} o'cl$s r$s,"}
f();f();f()
println "We're gonna r$s around the cl$s tonight"

Ungolfed:

i = 1
f = { ->
    println "${i++}, ${i++}, ${i++} o'clock, ${i++} o'clock rock,"}
}

f();f();f()

println "We're gonna r$s around the clock tonight"
Source Link
Loading