Advertisement
Guest User

Untitled

a guest
Nov 16th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. datatype expression =  Constant of int |
  2.         Variable of string |
  3.         Operator of string * expression |
  4.         Pair of expression list |
  5.         List of expression list
  6.  
  7. datatype pattern = ConstantP of int
  8.     | VariableP of string
  9.     | OperatorP of string * pattern
  10.     | PairP of pattern list
  11.     | ListP of pattern list
  12.     | UnorderedListP of pattern list
  13.     | Wildcard
  14.  
  15. val a = PairP([OperatorP("/", PairP([ConstantP 1, VariableP "adsfas"])), ConstantP 3])
  16. val b = Pair([Operator("/", Pair([Constant 1, Variable "adsfas"])), Constant 3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement