Last active
March 3, 2016 02:37
-
-
Save volgar1x/0d7a6b8a8d67cf572afc 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 Conn do | |
defstruct halted: false | |
end | |
def send(conn, _) when conn.halted do # does not compile | |
conn | |
end | |
def send(conn, _) when conn[:halted] do # does compile | |
conn | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment