-module(cost). -export([total/1]). total([{_, Money}|T]) -> Money + total(T); total([]) -> 0.