bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
/* Modified version of https://gist.github.com/non/51b83d0abc929cc4f0b153accf2bf02f | |
* to expose it's GADT's nature and provide the folding function. | |
* | |
* Should run out of the box with: amm <the_file> | |
*/ | |
import $ivy.`org.typelevel:cats-core_2.12:1.6.0` | |
object demo { | |
import cats.{Applicative, Functor, Id, Semigroupal, Traverse} |
package demo | |
import cats.{Applicative, Functor, Id, Semigroupal, Traverse} | |
import cats.arrow.FunctionK | |
/** | |
* Type-lifting operation to replace the wildcard type (i.e. _). | |
* | |
* In some cases we end up with code like: List[Option[_]]. This is | |
* fine unless you later need to write code in terms of a particular |
bin/kafka-topics.sh --zookeeper localhost:2181 --list
bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic
bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000
... wait a minute ...
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
A primer/refresher on the category theory concepts that most commonly crop up in conversations about Scala or FP. (Because it's embarassing when I forget this stuff!)
I'll be assuming Scalaz imports in code samples, and some of the code may be pseudo-Scala.
A functor is something that supports map
.