Skip to content

Instantly share code, notes, and snippets.

@leojpod
Created March 30, 2017 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leojpod/c95e0f0127558b5bb53cced6db0218ce to your computer and use it in GitHub Desktop.
Save leojpod/c95e0f0127558b5bb53cced6db0218ce to your computer and use it in GitHub Desktop.
the evil _
-- make some treatment on the tasks
toString: Item -> String
toString person item =
case item of
Task p -> ("task assigned to " ++ p.assignee)
_ -> "default printing"
-- note that we cannot access the Prop record of our items in the _ case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment