Skip to content

Instantly share code, notes, and snippets.

View analytic-bias's full-sized avatar
🏴
Shipping criminals against humanity to the Hague

Hypatia du Bois-Marie #RemoveCCP #中共下台 #FormalSciencesForHumanRight #形式科學為人權 analytic-bias

🏴
Shipping criminals against humanity to the Hague
View GitHub Profile
@analytic-bias
analytic-bias / main.agda
Last active October 23, 2023 10:46 — forked from wenkokke/main.agda
Code extracted from "Formalising type-logical grammars in Agda".
-- This file contains the code from the paper "Formalising
-- type-logical grammars in Agda", and was directly extracted from the
-- paper's source.
--
-- Note: because the symbol customarily used for the "left difference"
-- is unavailable in the Unicode character set, and the backslash used
-- for implication is often a reserved symbol, the source file uses a
-- different notation for the connectives: the left and right
-- implications are represented by the double arrows "⇐" and "⇒", and
{
"editor.fontSize": 16,
"terminal.integrated.shell.windows": "C:\\WINDOWS\\Sysnative\\cmd.exe",
"editor.wordWrap": "on",
"latex-workshop.latex.tools": [
{
"name": "latexmk",
"command": "latexmk",
"args": [
"-synctex=1",
@analytic-bias
analytic-bias / cloudSettings
Last active August 24, 2019 05:13
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-08-24T05:13:05.777Z","extensionVersion":"v3.4.2"}
outputInBrainf''' :: String -> String
outputInBrainf''' s = do c <- s
replicate (ord c) '+' ++ ".>"
module Codevs1080 where
import qualified Data.Vector as V; -- Use Vector for O(1) indexing
data Cmd = Add Int Int Int -- Order Index Addition
| Inq Int Int Int -- Order Left-Index Right-Index
deriving Show
logSolve :: [Int] -> [Cmd] -> [Int]
logSolve srcs cmds = V.toList addSum