misc module agda.PER where open import Level open import Data.Product open import Relation.Binary.Core variable a ℓ : Level record PartialEquivalenceRel {A : Set a} (_~_ : Rel A ℓ) : Set (a ⊔ ℓ) where constructor PER field sym : {a b : A} → a ~ b → b ~ a trans : {a b c : A} → a ~ b → b ~ c → a ~ c ...
The multiplication mu : M compose M -> M of a monad M : cal(C) -> cal(C) allows one to compose f : A -> M B and g : B -> M C via #import "@preview/fletcher:0.5.4" as fletcher: diagram, node, edge #diagram(cell-size: 15mm, $ A edge(f, ->) & M B edge(M g, ->) & M (M...
NOTE for harper.blog/2025/02/16/my-llm-codegen-workflow-atm/ 生成專案規格書 prompt Ask me one question at a time so we can develop a thorough, step-by-step spec for this idea.
Below typed/racket program will produce flo (define-type K (U Number Float)) (define n : K 1.2) (cond [(flonum? n) flo] [(number? n) num]) but if I change the order of clauses? (cond [(number? n) num] [(flonum? n) flo]) The result now is num.