ypdated
authorChristian Urban <urbanc@in.tum.de>
Sun, 27 Oct 2019 13:55:43 +0000
changeset 676 62d168bf7ac8
parent 675 d665e7dd66d7
child 677 decfd8cf8180
ypdated
progs/fib.j
progs/pow.scala
--- a/progs/fib.j	Sun Oct 27 13:45:54 2019 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-
-.class public fib.fib
-.super java/lang/Object
-
-.method public <init>()V
-   aload_0
-   invokenonvirtual java/lang/Object/<init>()V
-   return
-.end method
-
-.method public static write(I)V 
-    .limit locals 1 
-    .limit stack 2 
-    getstatic java/lang/System/out Ljava/io/PrintStream; 
-    iload 0
-    i2c
-    invokevirtual java/io/PrintStream/print(C)V 
-    return 
-.end method
-
-.method public static main([Ljava/lang/String;)V
-   .limit locals 200
-   .limit stack 200
-
-ldc 10
-istore 0
-ldc 0
-istore 1
-ldc 1
-istore 2
-ldc 0
-istore 3
-
-Loop_begin_0:
-
-ldc 0
-iload 0
-if_icmpge Loop_end_1
-iload 2
-istore 3
-iload 1
-iload 2
-iadd
-istore 2
-iload 3
-istore 1
-iload 0
-ldc 1
-isub
-istore 0
-goto Loop_begin_0
-
-Loop_end_1:
-
-iload 1
-invokestatic fib/fib/write(I)V
-
-
-   return
-
-.end method
--- a/progs/pow.scala	Sun Oct 27 13:45:54 2019 +0000
+++ b/progs/pow.scala	Sun Oct 27 13:55:43 2019 +0000
@@ -6,9 +6,9 @@
   case n => concat(A, pow(A, n- 1))
 }
 
-val A = Set("aa", "aaa")
-val B = Set("aaa", "aa")
-concat(A, B).size                     // -> 28 
+val A = Set("aa", "a")
+val B = Set("aaa", "aaaa")
+concat(A, B).size                     // -> 3