Guest User

Untitled

a guest
Feb 16th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. class virtual name =
  2. object
  3. end
  4.  
  5. and func (args_ty, ret_ty) =
  6. object(self)
  7. inherit name
  8.  
  9. val mutable memo_args = None
  10.  
  11. method arguments =
  12. match memo_args with
  13. | Some xs -> xs
  14. | None ->
  15. let args = List.map (fun ty -> new argument(self, ty)) args_ty in
  16. memo_args <- Some args; args
  17. end
  18.  
  19. and argument (func, ty) =
  20. object
  21. inherit name
  22. end
Add Comment
Please, Sign In to add comment