anchor.diff:          sprintf "
       vec4 array\[10\];
       .*_fillArray_.*\(array, 10\.0\);
  +    ColorsOut = array\[color\]"
  +
  +                
  +    GLSL.shouldCompileAndContainRegex [ Effect.ofFunction frag ] [ expectedFillArrayGLSL; expectedMainGLSL ]
  +
  +
  +[<ReflectedDefinition>]
  +let fillArrayReturn (array : Arr<N<10>, V4d>) denom = 
  +    for i in 0 .. 9 do
  +        array.[i] <- V4d(float i / denom)
  +
  +    array
  +    
  +
  +[<Fact>]
  +let ``Fill Array with Return Function``() =
  +    Setup.Run()
  +
  +    let frag (v : Vertex) =
  +        fragment {
  +            let array = Arr<N<10>, V4d>()
  +
  +
  +            let array1 = fillArrayReturn array 10.0
  +
  +            return array1.[uniform?color]
  +        }
  +                
  +    let expectedFillArrayGLSL =
  +        sprintf "
  +vec4\[10\] .*_fillArrayReturn_.*\(vec4 array\[10], float denom\)
  +{
  +    for\(int i = 0; \(i < 10\); i\+\+\)
  +    {
  +        array\[i] = vec4\(\(float\(i\) \/ denom\)\);
  +    }
  +    return array;
  +}"
  +
  +    let expectedMainGLSL =
  +        sprintf "
  +    vec4 array\[10\];
  +    vec4 array1\[10\] = .*_fillArrayReturn_.*\(array, 10\.0\);
       ColorsOut = array1\[color\]"
   
                   
  
positive.code: let fillArray (array : Arr<N<10>, V4d>) denom = 
      for i in 0 .. 9 do
          array.[i] <- V4d(float i / denom)
      
  
  [<Fact>]
  let ``Fill Array with Function``() =
  
negative.code:             let array = Arr<N<10>, V4d>()
  
              10.0 |> fillArray array
  
              return array.[uniform?color]
          }
  