- Prendre un petit chou sinon tu en manges pendant 1 semaine :D
- le blanchir entier dans eau salée (+bicarbonate pour la couleur et éviter les gaz) 10-15mn mais sans que les feuilles soit molles
- bien égoutter
- écarter les feuilles jusqu'au coeur (les feuilles bien blanches/jaunes)
- enlever la boule de feuiles du coeur
- les ciseler finement et les ajouter à la farce ci-dessous
- préparer une farce de porc (type chair à saucisse) 500gr voire moins sinon il t'en restera
- prendre de la mie de pain rassi et la mouiller avec un peu de lait et l'écraser (pas du pain de mie dégueu harry's, c'est trop sucré)
- mélanger la mie à la farce
- faire jaunir un oignon haché assez finement mais pas au mixeur de préférence et l'ajouter à la farce
This file contains hidden or 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
implicit val Function1ClosedCartesianCat: ClosedCartesianCat[Function1] = new ClosedCartesianCat[Function1] { | |
def id[A]: A => A = identity | |
def ○[A, B, C]: (B => C) => (A => B) => (A => C) = f => g => f compose g | |
def ⨂[A, C, D]: (A => C) => (A => D) => (A => (C, D)) = f => g => (a => (f(a), g(a))) | |
def exl[A, B]: ((A, B)) => A = _._1 | |
def exr[A, B]: ((A, B)) => B = _._2 | |
def it[A]: A => Unit = _ => () |
This file contains hidden or 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
trait ClosedCartesianCat[->[_, _]] extends CartesianCat[->] { | |
def it[A]: A -> Unit | |
def ap[A, B]: ((A -> B), A) -> B | |
def curry[A, B, C]: ((A, B) -> C) => (A -> (B :=> C)) | |
def uncurry[A, B, C]: (A -> (B -> C)) => ((A, B) -> C) | |
} |
This file contains hidden or 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
def it[A]: A -> Unit |
This file contains hidden or 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
def ap[A, B]: (A -> B, A) -> B |
This file contains hidden or 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
trait CartesianCat[->[_, _]] extends Cat[->] { | |
def ⨂[A, C, D]: (A -> C) => (A -> D) => (A -> (C, D)) | |
def exl[A, B]: (A, B) -> A | |
def exr[A, B]: (A, B) -> B | |
} |
This file contains hidden or 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
// lambda calculus augmented with cartesian product (A x B) and 2 projections from (A x B) to A and B | |
// projection1 from (A x B) to A | |
𝚷1(a:A, b:B) = a:A | |
// projection1 from (A x B) to B | |
𝚷2(a:A, b:B) = b:B | |
// cartesian product expressed in terms of the 2 projections | |
(𝚷1(c:A ⨂ B), 𝚷2(c: A ⨂ B)) = (c: A ⨂ B) |
This file contains hidden or 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
// simple identity function | |
def f: A => A = identity | |
// if I have an implicit Cat[=>] in my scope | |
val K = implicitly[Cat[Function1]] | |
// I can rewrite f into the language of categories | |
def f = K.id[A] | |
// Both are equivalent by the CHL isomorphism... |
This file contains hidden or 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
// in the context of a Category | |
def f: A => B = ??? | |
// ≌ representing isomorphism | |
f ○ Id ≌ Id ○ f ≌ f | |
// associativity | |
(h ○ g) ○ f ≌ h ○ (g ○ f) |
This file contains hidden or 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
implicit val Function1Cat: Cat[Function1] = new Cat[Function1] { | |
def id[A]: A => A = identity | |
def ○[A, B, C]: (B => C) => (A => B) => (A => C) = f => g => f compose g | |
} |