let
is the current 'enumerated' item of the list (whereas
i
is the corresponding index).
I think the best way for understanding such a code is by mental (pencil and paper are optional) execution: try to execute mentally the following code:
l = ["a","b","c"]
permute(l)