Home | History | Annotate | Download | only in Kaleidoscope
      1 # RUN: Kaleidoscope-Ch7 < %s 2>&1 | FileCheck %s
      2 
      3 # Sequence operator and iterative fibonacci function to test user defined vars.
      4 def binary : 1 (x y) y;
      5 
      6 def fibi(x)
      7   var a = 1, b = 1, c in
      8   (for i = 3, i < x in
      9      c = a + b :
     10      a = b :
     11      b = c) :
     12   b;
     13 
     14 fibi(10);
     15 # CHECK: Evaluated to 55.000000
     16