WARNING This list outdated, for the up to date version visit https://haskellcosm.com
Types of work:
- RD - research&development
- PR - product
- IP - in-house product
- CO - consulting
-- | Echo: a small experimental library for functional reactive programming. | |
{-# LANGUAGE | |
GADTs | |
, GeneralizedNewtypeDeriving | |
, TemplateHaskell | |
, RecursiveDo | |
, MagicHash | |
, UnboxedTuples | |
#-} |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE PolyKinds #-} |
WARNING This list outdated, for the up to date version visit https://haskellcosm.com
Types of work:
-------------------------------------------------- | |
-- Yoneda lemma | |
newtype Yoneda f a = | |
Yoneda (forall b. (a -> b) -> f b) | |
-- Nat (Hom(a, -), F) ~~ F a | |
-- this is `liftYoneda` | |
yoneda :: (Functor f) => f a -> Yoneda f a | |
yoneda x = Yoneda $ \f -> fmap f x |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE ExistentialQuantification #-} |
This project aim to illustrate with code the similarities and differences between .data()
and .datum()
. Feel free to fork and add other parallel examples, where .data()
and .datum()
do the same work with different syntaxes.
.data()
and .datum()
's generated elements are taggued and get collored accordingly using CSS class) :
.data:hover { fill: #B10000; opacity: 1; } /* data = RED */
.datum:hover { fill: #00B100; opacity: 1; } /* datum= GREEN */
This blog post series has moved here.
You might also be interested in the 2016 version.
# Deriving Typeclass Instances using Typed Holes | |
> module Conc where | |
> import Control.Applicative | |
We're presented with the following structure: | |
> data Concurrent a = Concurrent ((a -> Action) -> Action) | |
> data Action = Atom (IO Action) | |
> | Fork Action Action |
A zip function in javascript using .reduce
.
See Tom MacWright's post making juice with reduce
/ foldl
.
See also _.zip
and d3.zip
for alternative implementations and sample usage.