Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iintersecta([], _, _) :- !, fail.
- iintersecta(AS, BS, Inter) :- append(AS, _, BS), length(AS, L), L >= 4, Inter = BS. % string_concat
- iintersecta([A|AS], BS, Inter) :- iintersecta(AS, BS, IInter), Inter = [A|IInter].
- intersecta(AS, BS, Inter) :- iintersecta(AS, BS, Inter), !.
- intersecta(AS, BS, Inter) :- iintersecta(BS, AS, Inter), !.
- string_iintersecta([], _, _) :- !, fail.
- string_iintersecta(AS, BS, Inter) :- string_concat(AS, _, BS), string_length(AS, L), L >= 4, Inter = BS. % string_concat
- string_iintersecta([A|AS], BS, Inter) :- iintersecta(AS, BS, IInter), Inter = [A|IInter].
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement