I hereby claim:
- I am meta4 on github.
- I am petewilson (https://keybase.io/petewilson) on keybase.
- I have a public key whose fingerprint is 2BAE C866 FF28 5F74 D6A7 86A1 3704 1200 986D 2199
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# -*- coding: utf-8 -*- | |
"""Wed Mar 08, 2017 - 05:12 - Pete Wilson | |
Written after reading http://blog.plover.com/math/24-puzzle.html | |
Can be run from the command line with a string describing the puzzle. | |
Like so: | |
python p24solver.py "2 5 6 6 -> 17" |
This document explains a perl package I created to write XML the way CGI.pm
writes HTML using nested functions. The functions in this package take a list of entity contents to enclose between XML tags. They also take an optional hash reference specifying arbitrary XML attributes. Some of the entity contents might be nested XML entities, which include their own tags, attributes, contents, sub-entities, etc. The resulting nesting of XML elements should correspond directly to nested function calls in the code creating the XML fragment.
This article to explores lazy evaluation, closures, currying function arguments, with a splash of operator overloading for that last little bit of syntactic sugar. If you don't know what these things are, or you have never seen a demonstration of how powerful they can be, especially when combined, you might find the following interesting.