From the hub, tagged: "call"

Partial Predicates

Did you know you can call partial predicates with arguments added later on? This is how many of the higher order predicates like `maplist` work. But you can take advantage of this too! Let's take a look at `call`.

Functional Prolog: Map, Filter and Reduce

Prolog programs have both logical and procedural meanings. In this post we'll take a look at procedural ideas more commonly associated with functional programming than Prolog, namely: map, filter and reduce (foldl and foldr). We'll code them and then query them.