File size distribution: Difference between revisions

Update Lang example: Use new set item operator in assignment
m (Update Lang example: Fix spelling of Lang)
(Update Lang example: Use new set item operator in assignment)
Line 1,136:
# Replace "<pathToIO.lm>" with the location where the io.lm Lang module was installed to without "<" and ">"
ln.loadModule(<pathToIO.lm>)
 
 
fp.fileSizeDistribution = (&sizes, $[totalSize], $file) -> {
Line 1,164 ⟶ 1,165:
if($len == 0) {
fn.arraySet(&sizes, [0,] parser.op(+|&sizes[0]))= 1
}else {
$index = fn.int(fn.log10($len))
fn.arraySet(&sizes, [$index,] parser.op(+|&sizes[$index]))= 1
}
}
168

edits