Skip to content

Instantly share code, notes, and snippets.

@simenge
Created December 16, 2017 16:46
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 simenge/8809d7be57b791f93cdf03474d62589c to your computer and use it in GitHub Desktop.
Save simenge/8809d7be57b791f93cdf03474d62589c to your computer and use it in GitHub Desktop.
module Test where
data Lisp = Integer Int
| Str String
| FloatT Float
toString :: Lisp -> String
toString x = case x of
Integer i -> show i
| Str s -> s
| FloatT f -> show f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment