On Mon, Apr 16, 2012 at 11:22 AM, Jonathan S. Shapiro <[email protected]> wrote:
> So more on this
>
> The most common motivations for multiple instances at a single type come
> from ordering examples.
<snip>
>
> def CreateBTree(instantiate sortfn : 'a x 'a -> bool) -> BTree('a, 'b) = {
> }
FWIW when trying to wrap my head around bitc, I believe i also ran
into this with various implementations of hash functions, having
started with using a 'hashable' typeclass, and eventually switching to
passing the hashfn as a parameter. (which seemed like a failure to me
since the purpose of the exercise was to better familiarize myself
with typeclasses, but seeing this example makes me feel a bit better
about how it ended up)
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev