<div dir="ltr">The code:<div><br></div><div><div>printArray(Array, Size, IndexToStartWith)</div><div>    when array:size(Array) > IndexToStartWith -></div><div>  io:format("~w~n", [array:get(IndexToStartWith, Array)]),</div>
<div>  printArray(Array, Size, IndexToStartWith + 1).</div></div><div><br></div><div>The error:</div><div><br></div><div><div>> c(arrays_example).     </div><div>arrays_example.erl:23: illegal guard expression</div><div>
error</div></div><div><br></div><div>Why not?  I could pass the size of the array along (hence the Size variable), but why not procure </div><div>the length in the guard on the fly?</div></div>