All public logs
Combined display of all available logs of ElixirBlocks. You can narrow down the view by selecting a log type, the username (case-sensitive), or the affected page (also case-sensitive).
- 01:46, 11 June 2024 Admin talk contribs created page Struct Pattern Matching in Arguments of Functions (Created page with "=Example= <source> %Person{} = person </source> <source> defmodule Person do defstruct [ first_name: nil, last_name: nil, birthday: nil, location: "home" ] def full_name(%Person{} = person) do "#{person.first_name} #{person.last_name}" end def age(%Person{} = person) do days = Date.diff(Date.utc_today, person.birthday) days / 365.25 end def home(%Person{} = person) do %{person | location: "home"} end def away(%P...")