Skip to content

Instantly share code, notes, and snippets.

import scalaz._, Scalaz._, scalaz.Free._
object FreeMonadTest {
sealed trait Interact[A]
case class Ask(prompt: String) extends Interact[String]
case class Tell(msg: String) extends Interact[Unit]
type Dsl[A] = Free[Interact, A]
def ask(prompt: String): Dsl[String] = Free.liftF(Ask(prompt))
Welcome to Scala 2.12.0 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_112).
Type in expressions for evaluation. Or try :help.
scala> import scala.language.higherKinds
import scala.language.higherKinds
scala> import scala.language.implicitConversions
import scala.language.implicitConversions
scala> trait Functor[F[_],A] { def fmap[B](fn: A=>B): F[B] }
## System Information - Ensime troubleshoot report
- OS: `darwin`
- Emacs: `25.1.1`
- ensime-sbt-command: `/usr/local/bin/sbt`
- debug-on-error: `nil`
- exec-path: `(/usr/local/bin/ /usr/local/sbin/ /usr/bin/ /bin/ /usr/sbin/ /sbin/ /usr/texbin/ /usr/local/Cellar/emacs-plus/25.1/libexec/emacs/25.1/x86_64-apple-darwin16.1.0/)`
- Backtrace:
```
@ahanwadi
ahanwadi / README
Last active August 29, 2015 14:19
Connect to local ESX host or vCenter server using pyVmomi without password
Both vCenter server virtual appliance (VCVA) and ESXi host have pyVmomi library available locally. In addition, connecting to local vCenter server or ESXi host can be done without specifying password using the snippet below.
~ # python
Python 2.6.8 (unknown, Feb 12 2013, 11:35:47)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyVim import connect
>>> from pyVmomi import vim
>>>
>>> s = connect.Connect()