anchor.diff:              MyCall = ?LIN([MyVar,"=","call",decode_type(RetType), LambdaVar, "(", VarString ,")"]),
               {MyVar, [ MyCall | ArgCodeLines ]};
   
  -    #fix{ closure=Closure } ->
  -        #closure{ lambda = Lambda =  #lambda{ type=Type}} = Closure,
  -        {FunctionName,_} = codegen(Lambda),
  -        StructPointer = compil_table:newTemp(),
  -        ClosureTypeName = "clojure_fix",
  -        ClosureType = "%" ++ ClosureTypeName ++"*",
  -
  -        FixName =  "@fix",
  -        ValueName = "%fix_value",
  -        RetValueName = "%fix_ret",
  -        FixHeader = ?LIN(["define","i32",FixName,"(i32",ValueName,")"]),
  -        FixCall =  ?LIN([RetValueName,"=","call","i32",FunctionName,"(", ClosureType ,StructPointer,
  -                ",","i32",ValueName,")"]),
  -        FixReturn = ?LIN(["ret","i32",RetValueName]),
  -
  -        ArgTypes = [int],
  -        ArgsStr = lists:map( fun({Var, Type}) -> decode_type(Type) ++ " " ++  Var end,
  -            lists:zip(Vars, ArgTypes)),
  -        VarString = string:join(ArgsStr,", "),
  -
  -
  -        FunctionPointer = compil_table:newTemp(),
  -        AllocCode = ?LIN([StructPointer,"=","alloca","%" ++ ClosureTypeName]),
  -        GetFPCode = ?LIN([FunctionPointer,"=","getelementptr",ClosureType,StructPointer++ ",","i32 0,","i32 0"]),
  -        StoFPCode = ?LIN(["store","i32(i32)*", FixName ++ "," ,"i32(i32)*" ++ "*",FunctionPointer]),
  -
  -        Code = ?FUNCTION([ FixHeader, AllocCode, GetFPCode, StoFPCode, FixCall, FixReturn]),
  -        compil_emitter:function(Code),
  -
  -        MyVar = compil_table:newTemp(),
  -        MyCall = ?LIN([MyVar,"=","call",decode_type(RetType), FixName, "(", VarString ,")"]),
  -        {MyVar, [ MyCall | ArgCodeLines ]};
  -
  -
  -        Other -> % callee must be a closure
  +        %% call to fix point operators (complex stuff ;)
  +        #fix{ closure=Closure } ->
  +            #closure{ lambda = Lambda =  #lambda{ type=Type}} = Closure,
  +            {FunctionName,_} = codegen(Lambda),
  +            StructPointer = compil_table:newTemp(),
  +            ClosureTypeName = "clojure_fix",
  +            ClosureType = "%" ++ ClosureTypeName ++"*",
  +
  +            FixName =  "@fix",
  +            ValueName = "%fix_value",
  +            RetValueName = "%fix_ret",
  +            FixHeader = ?LIN(["define","i32",FixName,"(i32",ValueName,")"]),
  +            FixCall =  ?LIN([RetValueName,"=","call","i32",FunctionName,"(", ClosureType ,StructPointer,
  +                    ",","i32",ValueName,")"]),
  +            FixReturn = ?LIN(["ret","i32",RetValueName]),
  +
  +            ArgTypes = [int],
  +            ArgsStr = lists:map( fun({Var, Type}) -> decode_type(Type) ++ " " ++  Var end,
  +                lists:zip(Vars, ArgTypes)),
  +            VarString = string:join(ArgsStr,", "),
  +
  +
  +            FunctionPointer = compil_table:newTemp(),
  +            AllocCode = ?LIN([StructPointer,"=","alloca","%" ++ ClosureTypeName]),
  +            GetFPCode = ?LIN([FunctionPointer,"=","getelementptr",ClosureType,StructPointer++ ",","i32 0,","i32 0"]),
  +            StoFPCode = ?LIN(["store","i32(i32)*", FixName ++ "," ,"i32(i32)*" ++ "*",FunctionPointer]),
  +
  +            Code = ?FUNCTION([ FixHeader, AllocCode, GetFPCode, StoFPCode, FixCall, FixReturn]),
  +            compil_emitter:function(Code),
  +
  +            MyVar = compil_table:newTemp(),
  +            MyCall = ?LIN([MyVar,"=","call",decode_type(RetType), FixName, "(", VarString ,")"]),
  +            {MyVar, [ MyCall | ArgCodeLines ]};
  +
  +        %% calls to other objects ( names, results of other calls etc)
  +        Other ->
  +            %% target mus be a closure
               ClType = #typeCl{ lambda=FunType = #typeFun{ arguments=ArgTypes }, captures=CaptureTypes } = extract_type(Other),
               { StructPointer, PrevCodes} = codegen(Other),
   
  
positive.code:       child                 :: ast()
  	 }).
  
  -record(closure,{
          lambda              :: #lambda{},  % anonymous function
          type                :: #typeCl{},
  
negative.code:         none when Env /= global ->
              lookup_name(compil_table:getParentEnv(Env), Name);
          _ ->
              throw("Error name not found")
      end.
  
  
  %% -- The Closure Building ----------------------------------------------------
  
  %% @doc:    scan_free looks for free variables in all lambdas. the information
  %%          gathered in this step is not represented in the ast, it is only
  %%          stored in the env table.
  
  -spec scan_free(ast(), env_ref()) -> done.
  
  scan_free(#lambda{ child=Child, ref=Ref }, _ParentRef) ->
      scan_free(Child, Ref);
  