From: Mark Thom Date: Sun, 31 Jan 2021 06:37:23 +0000 (-0700) Subject: properly thread functors whose first subterm is a variable in thread_goals/4 X-Git-Tag: v0.9.0~150^2~67^2~13 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=c2e3b47d29871aca7338760f09a290c99cd78f24;p=scryer-prolog.git properly thread functors whose first subterm is a variable in thread_goals/4 --- diff --git a/src/loader.pl b/src/loader.pl index 9360e260..f8f766f7 100644 --- a/src/loader.pl +++ b/src/loader.pl @@ -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]