properly thread functors whose first subterm is a variable in thread_goals/4

This commit is contained in:
Mark Thom
2021-01-30 23:37:23 -07:00
parent a239007db0
commit c2e3b47d29

View File

@@ -421,7 +421,7 @@ thread_goals(Goals0, Goals1, Functor) :-
thread_goals(Goals0, Goals1, Hole, Functor) :-
( var(Goals0) ->
Goals0 = Goals1
Goals1 =.. [Functor, Goals0, Hole]
; ( Goals0 = [G | Gs] ->
( Gs == [] ->
Goals1 =.. [Functor, G, Hole]