This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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] } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## 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: | |
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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() |