Tue Apr 9 09:46:10 EDT 2019
Here's the thing: digital circuit design is mostly about multiplexers.
So Seq should have really good abstractions for that.
Basically, this is the 'case' or 'switch' statement.
Currently I have this working for lists, but it should work for
arbitrary collection types.
Is there a way to do this "flattening" operation better?
Write it as a fold?
What I want, is an algebraic data type instead of a case or switch
statement. As I've recently learned, it should be possible to write
it as a fold instead.
Summary: multiplexers are the most important circuit, and I've made it
very difficult to express them.
- monadic notation is cumbersome
- grouping only supports lists
- defaults are quite useful