Posted by
jon zingale on
URL: http://friam.383.s1.nabble.com/How-is-a-vector-space-like-an-evolutionary-function-tp7597965p7598157.html
For those algorithmically inclined readers, I coded up the examples in
Haskell. While the soberSort, keyShuffle, and compositeSort could each
be written in a few lines, I took the time to build out a KeySortable
type class and wrote the examples relative to it. There are 4 files
involved: Spandel.hs, MixedSpandrel.hs, Shape.hs, and Sortable.hs
The first two simply implement the examples. Shape.hs defines a notion
of ordered shapes and provides a generator for producing random lists
of shapes. Sortable.hs has the class implementation details. There you
will find that I have defined a _Pair_ datatype and then extend the Ord
class to it (ordering based on the first in the pair, the 'primary
phenomena') and to the Bifunctor class. Lastly, I define a KeySortable
class, contingent on Bifunctor, and extend it to include _Pair_. Aside
from the class constraint, creating an instance of KeySortable needs
the usual product maps (η, 𝜀), but then gets _sort_ and _shuffle_ for
free. For interested readers, the code can be found here:
https://github.com/jonzingale/Haskell/tree/master/epiphenomena--
Sent from:
http://friam.471366.n2.nabble.com/- .... . -..-. . -. -.. -..-. .. ... -..-. .... . .-. .
FRIAM Applied Complexity Group listserv
Zoom Fridays 9:30a-12p Mtn GMT-6 bit.ly/virtualfriam
un/subscribe
http://redfish.com/mailman/listinfo/friam_redfish.comarchives:
http://friam.471366.n2.nabble.com/FRIAM-COMIC
http://friam-comic.blogspot.com/