Jump to content

Middle three digits: Difference between revisions

→‎{{header|Scala}}: what the heck was that 'f"${v}%03d"' thing?
(→‎{{header|Scala}}: what the heck was that 'f"${v}%03d"' thing?)
Line 735:
intVals map (middleThree(_)) map {
case None => "No middle three"
case Some(v) => f"${v}%03d" .format(v) // Format the value, force leading zeroes
} mkString("\n")
</lang>
1,481

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.