solutions5/bf.scala
changeset 244 a359976a6f3e
parent 231 eecbc9ae73c2
child 264 ecd989eee8bd
--- a/solutions5/bf.scala	Sun Dec 09 01:36:49 2018 +0000
+++ b/solutions5/bf.scala	Mon Dec 10 02:23:30 2018 +0000
@@ -107,6 +107,7 @@
 def run(prog: String, m: Mem = Map()) = compute(prog, 0, 0, m)
 
 
+
 /*
 
 // some sample bf-programs collected from the Internet
@@ -138,9 +139,13 @@
 
 // hello world program 2
 run("""++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>+
-      +.<<+++++++++++++++.>.+++.------.--------.>+.>.""")
+       +.<<+++++++++++++++.>.+++.------.--------.>+.>.""")
 
+// hello world program 3
+run("""+++++++++[>++++++++>+++++++++++>+++++<<<-]>.>++.+++++++..
+       +++.>-.------------.<++++++++.--------.+++.------.--------.>+.""")
 
+ 
 // draws the Sierpinski triangle
 run("""++++++++[>+>++++<<-]>++>>+<[-[>>+<<-]+>>]>+[-<<<[
       ->[+[-]+>++>>>-<<]<[<]>>++++++[<<+++++>>-]+<<++.[-]<<