Skip to content

Instantly share code, notes, and snippets.

View klao's full-sized avatar

Mihaly Barasz klao

View GitHub Profile
@klao
klao / aoc2021.apl
Last active January 20, 2023 09:36
Advent of Code 2021, Dyalog APL
⍝ https://adventofcode.com/2021
⎕IO←1 ⍝ Except where it's explicitly changed
⍝ Day 01
d←,⎕CSV'i/day01.inp'⍬2
⎕← +/2</d
⎕← +/2</3+/d
⍝ Day 02

Keybase proof

I hereby claim:

  • I am klao on github.
  • I am klao (https://keybase.io/klao) on keybase.
  • I have a public key whose fingerprint is C4D7 B1BC D394 1035 DD5F 08E0 42B2 316F 7004 9997

To claim this, I am signing this object:

@klao
klao / PipesChurch.hs
Created October 30, 2013 18:38
Prototype of the Church-encoded Proxy for pipes
{-# LANGUAGE RankNTypes #-}
module Pipes.Church where
import Control.Monad (replicateM, liftM, join)
import Control.Monad.Trans.Class
--------------------------------------------------------------------------------
--
-- The "classical" implementation