Question: Need to write an swi prolog program with a predicate called uA described below using the LGN notation. uA/3 should basically return the length or
Need to write an swi prolog program with a predicate called uA described below using the LGN notation. uA/3 should basically return the length or number of times a string is found in the list. Examples of what it should do are seen in the picture below.

Note: in the specifications shown below, a (+) designation indicates that you obtain the predicate using the LGN 3.1 uA/3 (+) Prototypes: uA (-Length,+String, +Leftover) Arguments: Note: Parses string for sequence of "u", and, if succeeds, indicates length (number of "u"). Leftover is what is allowed to be left over, and will usually be bound to Really big note: You create predicate uA using the LGN. *) Sample Use. L 3 false. Note: in the specifications shown below, a (+) designation indicates that you obtain the predicate using the LGN 3.1 uA/3 (+) Prototypes: uA (-Length,+String, +Leftover) Arguments: Note: Parses string for sequence of "u", and, if succeeds, indicates length (number of "u"). Leftover is what is allowed to be left over, and will usually be bound to Really big note: You create predicate uA using the LGN. *) Sample Use. L 3 false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
