Changeset 3945 for to-imperative


Ignore:
Timestamp:
Sep 19, 2008, 3:01:07 PM (12 years ago)
Author:
yura
Message:
  • Nonparallel fib for n < 20
File:
1 copied

Legend:

Unmodified
Added
Removed
  • to-imperative/trunk/samples/fibint2.rf

    r3944 r3945  
    11$use StdIO Arithm;
    22
    3 $tfunc Fib s = s;
     3$func ParFib s = s;
     4
     5ParFib {
     6        19 = <Fib 19>;
     7        20 = <Fib 20>;
     8        sn = <Add <ParFib <Sub sn 1>> <ParFib <Sub sn 2>>>;
     9};
     10
     11$func Fib s = s;
    412
    513Fib {
    6         0 = 0;
    714        1 = 1;
     15        2 = 1;
    816        sn = <Add <Fib <Sub sn 1>> <Fib <Sub sn 2>>>;
    917};
    1018
    1119Main =
    12         1 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
     20        /*1 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
    1321        2 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
    1422        3 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
     
    1725        10 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
    1826        15 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
    19         20 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
    20         25 :: s1, <PrintLn s1 ' = ' <Fib s1>>,
     27        20 :: s1, <PrintLn s1 ' = ' <Fib s1>>,*/
     28        30 :: s1, <PrintLn s1 ' = ' <ParFib s1>>,
    2129        ;
Note: See TracChangeset for help on using the changeset viewer.