Skip to content

Instantly share code, notes, and snippets.

//add rand and bmp as dependencies in toml file
extern crate rand;
extern crate bmp;
use bmp::Image;
use rand::Rng;
#[derive(Clone)]
enum Expr {
VariableX,
VariableY,
@jdh30
jdh30 / JsonParser.fs
Last active January 30, 2024 14:06
Simple JSON parser written in F# using active patterns
type Json =
| Null
| Bool of bool
| Number of float
| String of string
| Array of Json list
| Object of (string * Json) list
type Bracket = Open | Close