Use lists:foldl/3

This commit is contained in:
Evgeniy Khramtsov 2018-06-27 13:36:58 +03:00
parent af8c6d2428
commit 9a11db91f9
1 changed files with 6 additions and 7 deletions

View File

@ -689,13 +689,12 @@ iq_disco_info(Host, Lang, Name, AddInfo) ->
infinity -> infinity ->
AddInfo; AddInfo;
MaxSize -> MaxSize ->
XData = lists:map( lists:foldl(
fun(NS) -> fun(NS, Acc) ->
Fs = http_upload:encode( Fs = http_upload:encode(
[{'max-file-size', MaxSize}], NS, Lang), [{'max-file-size', MaxSize}], NS, Lang),
#xdata{type = result, fields = Fs} [#xdata{type = result, fields = Fs}|Acc]
end, [?NS_HTTP_UPLOAD, ?NS_HTTP_UPLOAD_0]), end, AddInfo, [?NS_HTTP_UPLOAD_0, ?NS_HTTP_UPLOAD])
XData ++ AddInfo
end, end,
#disco_info{identities = [#identity{category = <<"store">>, #disco_info{identities = [#identity{category = <<"store">>,
type = <<"file">>, type = <<"file">>,