We've implemented selective functors in Haskell: https://github.com/snowleopard/selective …, OCaml: https://github.com/snowleopard/selective-ocaml …, and even Coq: https://github.com/tuura/selective-theory-coq … (the Coq repository contains some proofs of correctness that our selective instances are lawful). And there is also a PureScript fork!
-
-
Prikaži ovu nit
-
The Haskell library is now available on Hackage: http://hackage.haskell.org/package/selective ….
Prikaži ovu nit -
Selective Applicative Functors in 17 minutes:https://www.youtube.com/watch?v=h3XEHRX4isk …
Prikaži ovu nit
Kraj razgovora
Novi razgovor -
-
-
Maybe a "knee-jerk" question, but do "selective functors" have a category theoretic counterpart? :-)
-
I think yes, but I haven't yet had time to explore selective functors from the categorical viewpoint. Selective functors are monoids too, with the following functor product: data (:|:) f g a where (:|:) :: f (Either x a) -> g (x -> a) -> (:|:) f g a Does this make sense?
- Još 4 druga odgovora
Novi razgovor -
-
-
and is there an instance Selective ZipList
-
instance Selective ZipList where (<*?) :: ZipList (a + a') -> ZipList (a -> a') -> ZipList a' ZipList sums <*? ZipList fs = ZipList [ either f id sum | sum <- sums | f <- fs ] maybe
- Još 5 drugih odgovora
Novi razgovor -
-
-
This is so cool, it is always like "how comes we never thought about this before?", but eventually you did! Congratulations Andrey, I can't wait to refractor my code to use it.
-
Thanks, Aloïs! Actually, as it turned out similar ideas have been discussed previously, e.g. see here: https://github.com/snowleopard/selective/blob/master/paper/irc-log-branchy.md …, but for some reason they were never really pursued. I guess there are many cases where "selective functors" are simply hardcoded in one way or another.
- Još 1 odgovor
Novi razgovor -
-
-
so, basically, applicatives with imperative if?
-
I think so, yes. All branches are predetermined, no monadic generation of effects on the spot.
- Još 9 drugih odgovora
Novi razgovor -
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.