Cƛ96-;2↔ƛġ;:₌Π∆Ŀ=
ɽẊ':₌ʀ±∨;Ḃ⁼
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
import Data.List (sortOn) | |
import Text.Printf (printf) | |
type Env a = [(String, a)] | |
type Dist a = a -> a -> Int | |
lev :: Dist String | |
lev x "" = length x | |
lev "" y = length y | |
lev (x:xs) (y:ys) = if x == y |
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
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct vec { | |
size_t size, cpcty; | |
int *arr; | |
}; | |
typedef struct vec Vec; |
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
data P = R | L | Seq P P | Loop P | |
data Tape = Tape [Int] Int [Int] | |
empty :: Tape | |
empty = Tape (repeat 0) 0 (repeat 0) | |
left :: Tape -> Tape | |
left (Tape (l:ls) v rs) = Tape ls l (v:rs) |