summaryrefslogtreecommitdiff
path: root/test/Examples/Kaleidoscope/Chapter7.test
blob: 4843ca703aeda6e5f41f5d88e47f81f9e76be2b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# RUN: Kaleidoscope-Ch7 < %s 2>&1 | FileCheck %s

# Sequence operator and iterative fibonacci function to test user defined vars.
def binary : 1 (x y) y;

def fibi(x)
  var a = 1, b = 1, c in
  (for i = 3, i < x in
     c = a + b :
     a = b :
     b = c) :
  b;

fibi(10);
# CHECK: Evaluated to 55.000000