Skip to content

Instantly share code, notes, and snippets.

View taojang's full-sized avatar
🐢
slowly

Tao Yang taojang

🐢
slowly
View GitHub Profile

Keybase proof

I hereby claim:

  • I am taojang on github.
  • I am tyang (https://keybase.io/tyang) on keybase.
  • I have a public key ASB_2naS51rWSZKgMYxZ_xNqHLXLDfdkDSz8FZ62C-uIego

To claim this, I am signing this object:

@taojang
taojang / Chapter10.hs
Created June 7, 2016 17:04
Some freaky point free stuff of chapter 10 of the haskell book
module Chapter10 where
-- from Mark & Amr
myOr :: [Bool] -> Bool
myOr = foldr (||) False
myAny :: (a -> Bool) -> [a] -> Bool
myAny = (myOr .) . map
@taojang
taojang / core.clj
Created May 26, 2016 09:18
hello-cats
(ns hello-cats.core
(:require [cats.core :as m :refer [mlet]]
[cats.monad.either :as either]
[cats.monad.maybe :as maybe]
[cats.monad.identity :as id]
[cats.context :as ctx]
[cats.builtin :refer [sum-monoid prod-monoid vector-context]])
(:gen-class))
(defn m-mappend
import shapeless._
import scala.collection.generic.IsTraversableLike
import scala.util.Try
import scala.util.Success
import scala.language.higherKinds
import scala.language.implicitConversions
// @see https://github.com/milessabin/shapeless/blob/master/examples/src/main/scala/shapeless/examples/csv.scala
@taojang
taojang / swagger.yaml
Last active August 29, 2015 14:18 — forked from nickahoy/swagger.yaml
swagger: '2.0'
info:
title: CMS API
description: CMS Page Metadata
version: "1.0.0"
# the domain of the service
host: brands.zalando.net
basePath: /api
schemes:
- https