- Structure and Interpretation of Computer Programs
- Write Yourself a Scheme in 48 Hours / Write You A Scheme, Version 2
- http://komar.bitcheese.net/files/учебник-по-теории-категорий.pdf
- Algebra: Chapter 0
- Category Theory for Programmers
- Топосы - категорный анализ логики
- DEPENDENT TYPES IN HASKELL: THEORY AND PRACTICE
- Category Theory for Computing Science
This file contains 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
lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b | |
lens get set next value = fmap (set value) . next . get $ value | |
-- | A lens focusing on the first element in a pair | |
_1 :: Lens (a, x) (b, x) a b | |
_1 = lens fst (\(_, b) a -> (a, b)) | |
-- | A lens focusing on the second element in a pair | |
_2 :: Lens (x, a) (x, b) a b | |
_2 = lens snd (\(a, _) b -> (a, b)) |
This file contains 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
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE RankNTypes #-} | |
module Main where | |
import Data.Functor.Const | |
import Data.Functor.Identity (Identity (..)) | |
import Data.Monoid | |
data Profile = Profile {user :: User} |
This file contains 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 file is an example of overriding a GHC core Haskell library (like | |
# bytestring, containers, text, unix, etc) when building a Haskell package. | |
let default-nixpkgs = | |
builtins.fetchTarball { | |
# nixpkgs haskell-updates branch as of 2019/09/15. | |
url = "https://github.com/NixOS/nixpkgs/archive/a51b3367ab6acc72630da0bad50ce14fa86996d0.tar.gz"; | |
sha256 = "05d3jxxk5dxzs9b3nan16lhkrjnzf0bjd4xy66az86fsafnrr9rd"; | |
}; | |
in |
This file contains 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
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE RankNTypes #-} |
This file contains 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
/- | |
Copyright (c) 2014 Microsoft Corporation. All rights reserved. | |
Released under Apache 2.0 license as described in the file LICENSE. | |
Authors: Leonardo de Moura | |
notation, basic datatypes and type classes | |
-/ | |
prelude | |
notation `Prop` := Sort 0 |
This file contains 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 { stateShape } from '../store' | |
type ClientOrdersProps = { | |
orders: number[], | |
id: number, | |
} | |
const ClientOrders = ({ orders, id }: ClientOrdersProps) => | |
<div> | |
{orders.map( order => <div>{order}</div> )} |
This file contains 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
(set-env! | |
:source-paths #{"cljs"} | |
:dependencies '[[adzerk/boot-cljs "1.7.228-1"] | |
[adzerk/boot-reload "0.4.12"] | |
;; project dependencies | |
[org.clojure/clojure "1.8.0"] | |
[org.clojure/clojurescript "1.9.229"] | |
[reagent "0.6.0" | |
:exclusions [cljsjs/react |
This file contains 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
# | |
# read a .pyc file and pretty-print it | |
# | |
# copied from http://nedbatchelder.com/blog/200804/the_structure_of_pyc_files.html | |
# and updated to Python 3.5 (Nov 10th 2015) |
NewerOlder