Solving Puzzles with Amb

Ever since an article about fibers, I was curious about an amb operator. There are multiple articles explaining both what it is and how to implement it: Roseta Code and Eric Kidd’s blog. There is even a gem with two different implementations. What’s left unclear to me, though was how to solve problems with amb.I believe that the easiest way to understand something is to build it yourself and then try to explain it to others and that’s exactly what I’m doing now :)Recently, I’ve solved a few classical problems using amb. The result turned out to be short, simple and declarative.
Solving Puzzles with Amb #ruby #rails #rubyonrails #bosnia #programming #tutorials #rubydeveloper #railsdeveloper

Nezir Zahirovic

Freelance software developer Ruby On Rails (4 years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles