Advertisement
C4Cypher

Varadic calls in Mercury.

Jul 28th, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.32 KB | None | 0 0
  1.  
  2.  
  3. :- module varadic.
  4.  
  5. :- interface.
  6.  
  7. :- import_module io.
  8.  
  9. :- pred main(io::di, io::uo) is det.
  10.  
  11. :- implementation.
  12.  
  13. :- import_module type_desc.
  14.  
  15. :- type v(T, U)
  16.     --->    T, U.
  17.  
  18. main(!IO) :-  
  19.     X = (1, 2, 3, 4, "What", "Ha!", 6.8, "IT WORKS!"),
  20.     print(X, !IO), nl(!IO),
  21.     print(type_of(X), !IO), nl(!IO).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement