News for hackers. Stuff that matters.
Re:"Welcome to the Machine": State monads in Clojure by jrockway on Tuesday February 09, 2010 @07:22PM (#1113814)
you can't even make Set a functor in Haskell

Well sure, because map on a set is only defined over functions that return values that can be compared for equality, whereas the generic functor map is defined over all functions.

Re:"Welcome to the Machine": State monads in Clojure by eru on Tuesday February 09, 2010 @08:19PM (#1113922)
Exactly. (However Data.Set is only defined for comparable values, i.e. the Ord typeclass, not Eq.)
Re:"Welcome to the Machine": State monads in Clojure by jrockway on Tuesday February 09, 2010 @08:30PM (#1113952)
That is an efficiency hack to make it O(n log n) instead of O(n^2) rather than an intrinsic property of sets, functors, or Haskell :)
Re:"Welcome to the Machine": State monads in Clojure by eru on Tuesday February 09, 2010 @09:59PM (#1114101)
Indeed. But Hindley-Milner [1] type systems have trouble expressing commutative stuff in general.

[1] I hope I got the names correct.