All Projects → taretmch → hamcat

taretmch / hamcat

Licence: GPL-3.0 license
Category Theory for Programmers の勉強記録

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to hamcat

Tikzcd Editor
A simple visual editor for creating commutative diagrams.
Stars: ✭ 1,627 (+12415.38%)
Mutual labels:  category-theory
Discopy
a toolbox for computing with monoidal categories
Stars: ✭ 148 (+1038.46%)
Mutual labels:  category-theory
Every Single Day I Tldr
A daily digest of the articles or videos I've found interesting, that I want to share with you.
Stars: ✭ 249 (+1815.38%)
Mutual labels:  category-theory
Domains
A computational algebra system in Smalltalk.
Stars: ✭ 124 (+853.85%)
Mutual labels:  category-theory
Categories
Categories parametrized by morphism equality, in Agda
Stars: ✭ 141 (+984.62%)
Mutual labels:  category-theory
Cql
Categorical Query Language IDE
Stars: ✭ 196 (+1407.69%)
Mutual labels:  category-theory
Unplugged
Open book about math and computer science.
Stars: ✭ 1,189 (+9046.15%)
Mutual labels:  category-theory
reed-thesis
My undergradate thesis on coinductive types in univalent type theory
Stars: ✭ 14 (+7.69%)
Mutual labels:  category-theory
Lawvere
A categorical programming language with effects
Stars: ✭ 142 (+992.31%)
Mutual labels:  category-theory
Idris Ct
formally verified category theory library
Stars: ✭ 203 (+1461.54%)
Mutual labels:  category-theory
Quiver
A modern commutative diagram editor for the web.
Stars: ✭ 1,799 (+13738.46%)
Mutual labels:  category-theory
Cql
CQL: Categorical Query Language implementation in Haskell
Stars: ✭ 132 (+915.38%)
Mutual labels:  category-theory
Fstoolkit.errorhandling
An opinionated F# Library for error handling
Stars: ✭ 200 (+1438.46%)
Mutual labels:  category-theory
Foundational Knowledge For Programmers
List of resources about foundational knowledge for programmers (supposed to last a few decades)
Stars: ✭ 115 (+784.62%)
Mutual labels:  category-theory
monadic-mondays
Code samples for #monadicmonday topics
Stars: ✭ 86 (+561.54%)
Mutual labels:  category-theory
Fundamental Haskell
Fundamental Haskell book, to the point terse statements on Haskell, Category theory, and related fields. Encyclopedic pocketbook of meaning. Zen kōan-like meditations of understanding. For quick or memory curve spaced repetition learning.
Stars: ✭ 88 (+576.92%)
Mutual labels:  category-theory
Functional Examples
Examples with Functional JavaScript, following Professor Frisby's course
Stars: ✭ 179 (+1276.92%)
Mutual labels:  category-theory
functional-structures-refactoring-kata
Starting code and proposed solution for Functional Structures Refactoring Kata
Stars: ✭ 31 (+138.46%)
Mutual labels:  category-theory
AlgoSSAFY
삼성 청년 SW 아카데미 4기 서울 알고리즘 스터디 🔥🧑‍💻🔥
Stars: ✭ 14 (+7.69%)
Mutual labels:  programmers
Bastet
A ReasonML/Ocaml library for category theory and abstract algebra
Stars: ✭ 200 (+1438.46%)
Mutual labels:  category-theory

Hamcat

ドキュメントは以下で公開されています! → https://criceta.com/category-theory-with-scala/

Hamcat は、圏論に関する概念を実装した勉強用ライブラリです。

ライブラリの名前は、著者がハムスターが好きなのと、Homology と、Category Theory とを掛けて考えました。

ディレクトリ構成

本プロジェクトは以下のディレクトリ構成を持ちます。

  • core/src/main/scala/ : 圏論の概念のコード群
    • arrow/ : 射のラッパークラスを定義したパッケージ
    • data/ : データ構造を定義したパッケージ
      • instance/ : データ構造のインスタンスを定義したパッケージ
    • syntax/ : データ構造の文法を定義したパッケージ
  • docs/src/main : ドキュメント群
  • example/src/main/scala/ : サンプルコード群

使い方

本プロジェクトをクローンして、ローカル環境にてお使いください。

% git clone [email protected]:taretmch/hamcat.git --init

% sbt
sbt:hamcat> core/console
[info] Starting scala interpreter...
Welcome to Scala 2.13.3 (Java HotSpot(TM) 64-Bit Server VM, Java 10.0.1).
Type in expressions for evaluation. Or try :help.

scala> import hamcat.Implicits._
import hamcat.Implicits._

scala> Option("abcdefg") |+| Option("hijklmn")
val res0: Option[String] = Some(abcdefghijklmn)

scala> def isEven: Int => Boolean = _ % 2 == 0
def isEven: Int => Boolean

scala> def negate: Boolean => Boolean = b => !b
def negate: Boolean => Boolean

scala> def isOdd = isEven.fmap(negate)
def isOdd: Int => Boolean

scala> isOdd(3)
val res1: Boolean = true

scala> def isLengthEven: String => Boolean = isEven.contramap(_.length)
def isLengthEven: String => Boolean

scala> isLengthEven("abcdefg")
val res3: Boolean = false

資料の更新について

ドキュメントは scalameta/mdoc を使って書かれています。編集する場合、可能であれば mdoc を使っていただければと思います。

ドキュメントは HonKit を使って静的サイトにしています。ローカルでの静的サイトを確認するには、npm パッケージをインストールする必要があります。

% npm install
# or
% yarn install

以下のコマンドを実行したあと

% sbt docs/textBuildHtml

honkit/docs/index.html で確認できます。textBuildHtml は、mdoc を実行後 HonKit でビルドするコマンドです。

ライセンス

Category Theory for Programmers - Scala Edition のコピーレフトを継承し、GPL-3.0 ライセンスの下公開しています。

免責事項

本プロジェクトは、Bartosz Milewski 氏著 Category Theory for Programmers - Scala Edition を翻訳し、読みながら作成した勉強記録です。

ドキュメントの章構成は基本的に原文に則っていますが、省略している箇所もあります。なお、非公式な翻訳であり、個人的な解釈を含む表現もあるため、閲覧の際はそれらの点に留意してお読みください。

内容や表現が間違っている箇所、修正した方が良い箇所、修正すればよりわかりやすくなる箇所等ありましたら、プルリクエストにてご提案いただけると助かります。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].