List.foldl and capture syntax