18 lines
249 B
Plaintext
18 lines
249 B
Plaintext
data Pair a b = { MkPair a b }
|
|
|
|
defn fst p = {
|
|
case p of {
|
|
MkPair a b -> { a }
|
|
}
|
|
}
|
|
|
|
defn snd p = {
|
|
case p of {
|
|
MkPair a b -> { b }
|
|
}
|
|
}
|
|
|
|
defn pair = { MkPair 1 (MkPair 2 3) }
|
|
|
|
defn main = { fst pair + snd (snd pair) }
|