-- -*- M2-comint -*- hash: 949246077914824943

i1 : load "Macaulay2Doc/demos/demo1.m2"

i2 : listUserSymbols

o2 = symbol  class            value  location of symbol
     ------  -----            -----  ------------------                                                                          
     g       FunctionClosure  g      /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:11:0-11:1

i3 : code g

o3 = /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:11:4-14:9: --source code:
     g = y -> (
          c := f(y-1);
          d := f(y-2);
          c+d)

i4 : g 4

     17
o4 = --
      6

o4 : QQ

i5 : g 3

     7
o5 = -
     2

o5 : QQ

i6 : g 2
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:8:11:(3):[2]: error: division by zero
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:8:11:(3): entering debugger (enter 'help' to see commands)
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:8:10-8:13: --source code:
     b := 1/x;

ii7 : listLocalSymbols

oo7 = symbol  class            value                                                    location of symbol
      ------  -----            -----                                                    ------------------                                                                        
      a       String           "hi there"                                               /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:7:5-7:6
      b       Nothing          null                                                     /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:8:5-8:6
      x       ZZ               0                                                        /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:6:5-6:6
      f       FunctionClosure  FunctionClosure[/usr/share/Macaulay2/Macaulay2Doc/demo.  /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:6:0-6:1

ii8 : code f

oo8 = /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:6:5-9:9: --source code:
      f := x -> (
           a := "hi there";
           b := 1/x;
           b+1)

ii9 : step 0
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:8:11:(3):[2]: --stepping limit reached
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:8:11:(3): entering debugger (enter 'help' to see commands)
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:8:10-8:13: --source code:
     b := 1/x;

ii10 : end
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:13:11:(3): entering debugger (enter 'help' to see commands)
/usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:13:10-13:16: --source code:
     d := f(y-2);

ii11 : listLocalSymbols

oo11 = symbol  class            value                                                    location of symbol
       ------  -----            -----                                                    ------------------                                                                          
       c       QQ               2                                                        /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:12:5-12:6
       d       Nothing          null                                                     /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:13:5-13:6
       y       ZZ               2                                                        /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:11:4-11:5
       f       FunctionClosure  FunctionClosure[/usr/share/Macaulay2/Macaulay2Doc/demo.  /usr/share/Macaulay2/Macaulay2Doc/demos/demo1.m2:6:0-6:1

ii12 : break

i13 : 
