@@ -4,7 +4,7 @@ import io.github.kelvindev15.prolog.core.Constant.Atom
44import  io .github .kelvindev15 .prolog .core .PrologList .{Cons , Nil }
55import  io .github .kelvindev15 .prolog .core .Struct .{Clause , Directive , Fact , Rule }
66import  io .github .kelvindev15 .prolog .core .theory .Theory 
7- import  io .github .kelvindev15 .prolog .core .{PrologList , Struct , Term , Variable }
7+ import  io .github .kelvindev15 .prolog .core .{Constant ,  PrologList , Struct , Term , Variable }
88
99import  scala .annotation .targetName 
1010
@@ -21,6 +21,13 @@ trait PrologDSL
2121    */  
2222  def  theory (clauses : Clause * ):  Theory  =  Theory (clauses* )
2323
24+   /**  Returns a [[Struct ]]. 
25+    *  
26+    * @param  functor  the functor of the struct. 
27+    * @param  arguments  the arguments of the struct. 
28+    */  
29+   def  structOf (functor : Atom , arguments : Term * ):  Struct  =  Struct (functor, arguments* )
30+ 
2431  /**  Returns a [[Fact ]]. 
2532    * 
2633    * @param  fact  
@@ -54,6 +61,12 @@ trait PrologDSL
5461    */  
5562  def  atomOf (value : String ):  Atom  =  Atom (value)
5663
64+   /**  Returns a [[Constant.Numeric ]]. 
65+    *  
66+    * @param  value  the value of the numeric constant. 
67+    */  
68+   def  numOf (value : (Int  |  Double )):  Constant .Numeric  =  Constant .Numeric (value)
69+ 
5770  /**  Returns a [[Variable ]]. 
5871    * 
5972    * @param  name  
0 commit comments