Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -module(complex).
- -compile(export_all).
- header() ->
- "Colors".
- item() ->
- A = dict:from_list([{name, "red"}, {current, true}, {url, "#Red"}]),
- B = dict:from_list([{name, "green"}, {current, false}, {url, "#Green"}]),
- C = dict:from_list([{name, "blue"}, {current, false}, {url, "#Blue"}]),
- [A, B, C].
- link(Ctx) ->
- {ok, Val} = dict:find(current, Ctx), Val.
- list() ->
- length(item()) =/= 0.
- empty() ->
- length(item()) =:= 0.
- %%---------------------------------------------------------------------------
- start() ->
- code:add_patha(".."),
- Output = mustache:render(complex, "complex.mustache"),
- io:format(Output, []).
Add Comment
Please, Sign In to add comment