The Towers Of Hanoi
Implemented in Logical and Functional Programming

Search for a command to run...
Articles tagged with #recursion
Implemented in Logical and Functional Programming

In the last seven posts we introduced the main concepts and syntax of Pilog. However, all the queries were only done in interactive mode from the REPL. So how do we use it from PicoLisp? Calling Pilog from Lisp and vice versa The interface from Pico...

Today we will talk about an important data structure which is often used in Pilog programming: Lists. This post is based on this tutorial. What is a list in Pilog? Basically, it's the same like in PicoLisp: A sequence of elements. Here are some exam...

In the last post, we discussed briefly the backtracking search algorithm. Let's explore this topic a little further as it's an important concept in Pilog programming. This post is based on this tutorial. A recursive example Let's illustrate the conc...

Task description The Fibonacci sequence is a sequence Fn of natural numbers defined recursively: F0 = 0 F1 = 1 Fn = Fn-1 + Fn-2, if n>1 Write a function to generate the nth Fibonacci number. Solutions can be iterative or recursive (though recu...

In the previous posts, we discussed the theory of binary trees. Now we will look at at two actually useful implementations of binary trees: the cache function and the enum function. Obviously you can also use those functions without knowing anything ...
