repl eats program output
See original GitHub issuetaken from http://scalapuzzlers.com/#pzzlr-013
Welcome to Scala.next (pre-alpha) (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_45).
Type in expressions to have them evaluated.
Type :help for more information.
scala> implicit object RomanOrdering extends Ordering[RomanNumeral] {
def compare(a: RomanNumeral, b: RomanNumeral) = a.value compare b.value
}
defined module RomanOrdering
scala>
scala>
val numerals = SortedSet(RomanNumeral("M", 1000), RomanNumeral("C", 100), RomanNumeral("X", 10), RomanNumeral("I", 1), RomanNumeral("D", 500), RomanNumeral("L", 50), RomanNumeral("V", 5))
numerals: scala.collection.immutable.SortedSet[RomanNumeral] = TreeSet(RomanNumeral(I,1), RomanNumeral(V,5), RomanNumeral(X,10), RomanNumeral(L,50), RomanNumeral(C,100), RomanNumeral(D,500), RomanNumeral(
scala>
scala> println("Roman numeral symbols for 1 5 10 50 100 500 1000:")
Roman numeral symbols for 1 5 10 50 100 500 1000:
scala> for (num <- numerals; sym = num.symbol) { print(s"${sym} ") }
scala> numerals map { _.symbol } foreach { sym => print(s"${sym} ") }
scala>
The numbers were printed, but then they were swallowed by repl and replaced by scala>
invitation.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Replit: the collaborative browser based IDE - Replit
Write and run code in 50+ languages online with Replit, a powerful IDE, ... "Tightly integrated code generation, editing and output - well...
Read more >How do I display output in Repl.it using Javascript?
I'm trying to get the output to display to the console and I'm ... Run code snippet. Hide results. Expand snippet. javascript ·...
Read more >Do Meal Replacements Work For Weight Loss? - Allina Health
athletic man eats meal replacement bar for weight loss ... day as part of a program results in calorie reduction and weight loss...
Read more >Mitral valve repair and mitral valve replacement - Mayo Clinic
Results · Not smoking · Getting regular exercise · Eating a healthy diet · Managing stress ...
Read more >Jenny Craig Diet Review 2022: Does It Work for Weight Loss?
The program delivers low calorie prepackaged meals and offers one-on-one support from a coach. The goal is to remove the guesswork about what...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think a very simple fix would be to print a new line after a command is interpreted
Ammonite prints an additional new line after each command. It also prints a new line for commands returning Unit values.