Created
September 4, 2015 02:41
-
-
Save laser/5f5fb02e98b169b4a2ef to your computer and use it in GitHub Desktop.
yarply
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
module Main where | |
data Foo = Foo | |
{ x :: String | |
, y :: String | |
, z :: String | |
} deriving (Show) | |
q = Foo "one" "two" "three" -- Foo {x = "one", y = "two", z = "three"} | |
q2 = q { x = "nine" } -- Foo {x = "nine", y = "two", z = "three"} | |
{-let og = Foo "Original"-} | |
{-let ns = setBar og "New School"-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment