Using the List Monad it's possible to rig up a basic logic program, where the bulk of the code simply asserts the shape of the answer rather than worrying about generating the solution space. The below code is a full solution to a relatively simple, but classic, logic puzzle.
Showing posts with label problem solving. Show all posts
Showing posts with label problem solving. Show all posts
Friday, March 16, 2018
Logic programming example
Using the List Monad it's possible to rig up a basic logic program, where the bulk of the code simply asserts the shape of the answer rather than worrying about generating the solution space. The below code is a full solution to a relatively simple, but classic, logic puzzle.
Subscribe to:
Posts (Atom)
bundlephobia
JavaScript bloat is a more real problem today than it ever was. Bundlephobia lets you understand the performance cost of adding a npm pack...
-
Programmers almost always need the ability to find and replace certain text across multiple files in their projects. Most IDEs provide find ...
-
This is yet another rails stack installation how to. It is useful for installing a production rails hosting environment using Nginx as the ...
-
Git is a Version Control System , it is used to keep a history of all the changes you made into your code, manage releases, makes it easier...