Created
February 26, 2016 15:22
-
-
Save nessamurmur/6d5ad3f32965b90b5d1a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Character do | |
import Algae.Maybe | |
@type t :: %__MODULE__{ | |
name: Just.t | Nothing.t | |
} | |
defstruct name: maybe | |
@spec return_dan :: Character.t | |
def return_dan, do: %Character{name: "Dan"} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment