Comment

Comment by rabbits77

I’d argue that is not the most ideal Prolog solution. More like it’s simply a recursive implementation of an imperative solution.

For fractals you’ll want to be able to recognize and generate the structures. It’s a great use case for Definite Clause Grammars (DCGs). A perfect example of this would be Triska’s Dragon Curve implementation. https://www.youtube.com/watch?v=DMdiPC1ZckI

parent rabbits77 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton