标题可能已关闭,但我有一个log_norm/1
名为列表。
log_norm(List) ->
log_norm(List,[]).
log_norm([], Newlist) ->
lists:reverse(Newlist);
log_norm([Input|T], Newlist) ->
X = math:log(Input/???), % ??? should be the previous head of the list Input-1.
log_norm(T, [X|Newlist]).
遍历到列表的新“头”后,如何获取上一个“头”或输入?