Skip to content

Instantly share code, notes, and snippets.

Melchizedek Mzk-Levi

Block or report user

Report or block Mzk-Levi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View afm1.scala
type ArtifactId = Int
trait ArtifactRepoF[+A]
object ArtifactRepoF {
case class Drop[+A](id: ArtifactId, n: A) extends ArtifactRepoF[A]
case class Query[+A](id: ArtifactId, onResult: Artifact => A) extends ArtifactRepoF[A]
case class Put[+A](a: Artifact, n: A) extends ArtifactRepo[A]
val functor: Functor[ArtifactRepoF] =
@Mzk-Levi
Mzk-Levi / gist:9841da3858ccca19f60d
Created Apr 23, 2015
KASPAAR bibliography (incomplete)
View gist:9841da3858ccca19f60d
P. Wadler -
Propositions As Types
Monads for Functional programming
Course in General Linguistics - Ferdinand de Saussure
Homotopy Type Theory - Univalent Foundations of Mathematics
On the Meanings of the Logical Constants and the Justifications of the Logical Laws - Per Martin-Löf
Proofs & Types - Yves Girad
Lectures on the Curry Howard Isomorpism - Morten Heine Sørensen M.Sc Ph.D (Author), Pawel Urzyczyn prof. dr hab. (Author)
View gist:51e690ebc36ed75650ac

Denotational [Semantics &] Design Notes

“Perfection is achieved not when there is nothing left to add, but when there is nothing left to take away” (Antoine de Saint-Exupéry)

--

The semantic function in DDWTCM & DDFMTP papers, ⟦_⟧, μ, decribes a mapping from a Syntactic Doman → Semantic Domain

@Mzk-Levi
Mzk-Levi / ncompositions.scala
Last active Mar 24, 2018
Horizontal & Vertical Compositions of Natural Transformations
View ncompositions.scala
trait Functor[F[_]] {
def map[A, B](as: F[A])(f: A => B): F[B]
}
object Functor {
def apply[F[_]](implicit e: Functor[F]): Functor[F] = e
}
trait ~>[F[_], G[_]] {
def apply[A](x: F[A]): G[A]
View Coroutine notes
Coroutines are computer program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations.
"Subroutines are special cases of ... coroutines." –Donald Knuth.
When subroutines are invoked, execution begins at the start, and once a subroutine exits, it is finished;
an instance of a subroutine only returns once, and does not hold state between invocations.
By contrast, coroutines can exit by calling other coroutines,
which may later return to the point where they were invoked in the original coroutine;
from the coroutine's point of view, it is not exiting but calling another coroutine.
Thus, a coroutine instance holds state, and varies between invocations;
@Mzk-Levi
Mzk-Levi / SetJDK
Last active Aug 29, 2015
Switch JDK bash function
View SetJDK
# Set JDK
# source - http://www.jayway.com/2014/01/15/how-to-switch-jdk-version-on-mac-os-x-maverick/
#
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
You can’t perform that action at this time.