defmodule Fun do defstruct value: 0, function: nil def curlystruct do %__MODULE__{value: 42, function: &(&1 * 2)} end def evalstruct do curlystruct() end end