On Mar 29, 2014, at 9:39 AM, Sam Ritchie <sritchi...@gmail.com> wrote: > defadt defines an algebraic data type - so, imagine a record with a finite > number of implementations (Boolean is an algebraic data type since it only > has "true" and "false", for example. Chess pieces would be another one.) > > Once you define an ADT you can use that contrib library's "match" macro to do > exhaustive case matches. Without the defadt thing, you just have to trust > that the user knows how to handle all of your cases.
Cool. That makes sense. I think that part of my 30+ years ago Comp Sci degree must be very rusty :) So what would be the "modern" Clojure way to implement ADTs... Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "Perfection is the enemy of the good." -- Gustave Flaubert, French realist novelist (1821-1880)
signature.asc
Description: Message signed with OpenPGP using GPGMail