Slightly altered (blured) version of Clifford attractors.
It follows the standard equations:
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) |
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct vec { | |
size_t size, cpcty; | |
int *arr; | |
}; | |
typedef struct vec Vec; |
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 |
ɽẊ':₌ʀ±∨;Ḃ⁼
Cƛ96-;2↔ƛġ;:₌Π∆Ŀ=