Skip to content

Instantly share code, notes, and snippets.

@talentdeficit
Created November 10, 2016 20:10
Show Gist options
  • Save talentdeficit/90abda869aefff8641d8bd03b124e631 to your computer and use it in GitHub Desktop.
Save talentdeficit/90abda869aefff8641d8bd03b124e631 to your computer and use it in GitHub Desktop.
<%= for {name, info} <- context[:shapes] do %>shape(<%= name %>) ->
<%= if info[:type] == <<"list">> %>
ok;
<% else %>
ok;
<% end %>
<% end %>shape(_) -> erlang:error(badarg).
@goulashify
Copy link

goulashify commented Nov 10, 2016

Would:

<%= for {name, info} <- content[:shapes] do %>
    shape(<%= name %>) -> <%= if info[:type] == <<"list">> do %> it's a list! <% else %> it's not a list <% end %>
<% end %>

work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment