![]() The first is when a call or goal matches the head of a clause. Visual Prolog performs unification in two places. Using the Equal Sign to Unify Compound Domains Also date ( "April", 14, 1960 ) matches date ( Mo, Da, Yr ) and binds Mo to "April", Da to 14, and Yr to 1960. For example, date ( "April", 14, 1960 ) matches X and binds X to date ( "April", 14, 1960 ). This means you can use a compound value to pass the whole collection of items as a single value, and then use unification to pick them apart. The functors of these values are person and date.Ī compound value can unify either with a simple variable or with a compound value that matches it(perhaps containing variables as parts of its internal structure). In this example, there are two sub-parts in the compound birthday value: the argument person("Per", "Schultze") and the argument date("Apr", 14, 1960).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |