Symbol | Name | Typeclass | import |
---|---|---|---|
` | @ | ` | Cartesian Builder |
=== |
Equals | Eq |
cats.syntax.eq._ |
=!= |
Not Equals | Eq |
cats.syntax.eq._ |
` | + | ` | Semigroup plus |
<+> |
SemigroupK combine | SemigroupK |
cats.syntax.semigroupk._ |
~> |
Natural transformation | N/A | cats._ |
⊥ |
Bottom | N/A | cats._ |
⊤ |
Top | N/A | cats._ |
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
//This was taken from the Swift OpenGL Example on GitHub | |
// View code | |
import Foundation | |
import UIKit | |
import QuartzCore | |
import OpenGLES | |
import GLKit | |
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
//The GameViewController must be the delegate of the GLKView | |
import UIKit | |
import GLKit | |
import OpenGLES | |
class GameViewController: UIViewController, GLKViewDelegate { | |
var context: EAGLContext! |
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 UIKit | |
import GLKit | |
import OpenGLES | |
let GLENUM_GL_RENDERBUFFER = GLenum(GL_RENDERBUFFER) | |
let INT_GL_RENDERBUFFER = Int(GL_RENDERBUFFER) | |
let GLUINT_GL_FRAMEBUFFER = GLuint(GL_FRAMEBUFFER) | |
let GLENUM_GL_FRAMEBUFFER = GLenum(GL_FRAMEBUFFER) | |
let GLENUM_GL_COLOR_ATTACHMENT0 = GLenum(GL_COLOR_ATTACHMENT0) | |
let GLENUM_GL_VERTEX_SHADER = GLenum(GL_VERTEX_SHADER) |
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
Starting ENSIME server: /usr/lib/jvm/java-8-openjdk-amd64/bin/java -classpath /home/yilin/.ivy2/cache/org.ensime/monkeys_2.11/jars/monkeys_2.11-0.9.10-SNAPSHOT.jar:/home/yilin/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.11.8.jar:/home/yilin/.ivy2/cache/org.ensime/ensime_2.11/jars/ensime_2.11-0.9.10-SNAPSHOT.jar:/home/yilin/.ivy2/cache/org.ensime/server_2.11/jars/server_2.11-0.9.10-SNAPSHOT.jar:/home/yilin/.ivy2/cache/org.ensime/core_2.11/jars/core_2.11-0.9.10-SNAPSHOT.jar:/home/yilin/.ivy2/cache/org.scala-lang/scala-compiler/jars/scala-compiler-2.11.8.jar:/home/yilin/.ivy2/cache/org.scala-lang/scala-reflect/jars/scala-reflect-2.11.8.jar:/home/yilin/.ivy2/cache/org.scala-lang.modules/scala-xml_2.11/bundles/scala-xml_2.11-1.0.4.jar:/home/yilin/.ivy2/cache/org.scala-lang.modules/scala-parser-combinators_2.11/bundles/scala-parser-combinators_2.11-1.0.4.jar:/home/yilin/.ivy2/cache/org.ensime/api_2.11/jars/api_2.11-0.9.10-SNAPSHOT.jar:/home/yilin/.ivy2/cache/ch.qos.logback/logback-classic/jars/log |
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
ENSIME server starting... | |
Connecting to Swank on port 49075.. | |
Connected to ENSIME speaking protocol 0.8.20, please wait while the project is loaded. | |
Initializing Analyzer. Please wait... | |
ENSIME ready. Hacks and glory await! | |
Server connection closed unexpectedly: connection broken by remote peer |
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
;; the package manager | |
(require 'package) | |
(setq | |
use-package-always-ensure t | |
package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("org" . "http://orgmode.org/elpa/") | |
("melpa" . "http://melpa.org/packages/"))) | |
(package-initialize) | |
(when (not package-archive-contents) |
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
//local defined for GlobalEnv => Option[LocalEnv] | |
def localOption[LocalEnv, GlobalEnv, A](r: Reader[LocalEnv, A])(f: GlobalEnv => Option[LocalEnv]): Reader[GlobalEnv, Option[A]] = | |
Reader(globalEnv => f(globalEnv).map(r.run)) | |
//generalization of the above in terms of Functors | |
def localF[F[_], A, AA, B](r: Reader[A, B])(f: AA => F[A])(implicit F: Functor[F]): Reader[AA, F[B]] = | |
Reader(aa => f(aa).map(r.run)) | |
//generalization of the above in terms of Kleislis | |
def localFK[F[_], A, AA, B](r: Kleisli[Id, A, B])(f: AA => F[A])(implicit F: Functor[F]): Kleisli[F, AA, 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
package drone | |
import fs2._ | |
import java.time.Instant | |
import java.util.UUID | |
object Time { | |
def local: Task[Instant] = Task.delay(Instant.now()) | |
} |
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
object gist { | |
import shapeless._ | |
trait Semigroup[A] { | |
def combine(a0: A, a1: A): A | |
} | |
implicit final class SemigroupCombineOps[A](a0: A)(implicit S: Semigroup[A]) { | |
def combine(a1: A): A = S.combine(a0, a1) |
OlderNewer