Skip to content

Instantly share code, notes, and snippets.

@shankardevy

shankardevy/catalog.ex Secret

Created Jul 14, 2017
Embed
What would you like to do?
defmodule Mango.Catalog do
alias Mango.Catalog.Product
def list_products do
product1 = %Product{ name: "Tomato", price: 50, is_seasonal: false }
product2 = %Product{ name: "Apple", price: 100, is_seasonal: true }
[product1, product2]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment