Dumb Q of the day. Why can't I get 'cons' like functionality from a set? It's derivable (in an awful way), no? I just want to take 'an' elem
Dunno, but it was mostly about rewrite rules on Cons type-class. I don't think it will solve your problem.
-
-
exploited Cons; did not generalise it. Slides will be available after
#ylj17 next month.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Cons deals with (at|de)taching arbitrary elems at LHS of structure (Snoc for RHS).
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Law would be: uncons (cons a s) = Just (a, s). So doesn't work with Ord- or hash-based sets.
-
I see, so I want "add/find" for it to be lawful?
- Show replies
New conversation -
-
-
Of course, you could write a law-breaking instance, and maybe it will be useful for you. But please don't inflict it on other folks :)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.