let adjs = [| "queer"; "electric"; "space"; "super"; "discount"; "extreme"; "far-left";
    "far-right"; "unreconstructed"; "modern"; "eternal"; "original"; "historical"; "tankie"; "mystical"; "arcane"; "catholic"; "protestant"; "irish"; "dialectical"; "confucian"; "orbital"; "suborbital"; "martian"; "minimalist"; "moist"; "dire"; "trotskyite"; "trotskyist"; "supreme"; |] 
let prefixes = [|"neo"; "post"; "retro"; "anti"; "counter"; "pre"; "paleo"; "femino"; "anarcho"; "oligo"; "meta"; "diabolo"; "theo"; "petro"; "sado"; "arachno"; "psycho"; "eroto";
    "nano"; "mini"; "xeno"; "astro"; "femto"; "electro"; "endo"; "arch"; "macro"; 
    "cardio"; "mesmo"; "chrono"; "nycto"; "megalo"; "lesbo"; "masculo"; "ultra"; "urtla";
    "proto"; "weebo"; "thanato"; "volcano"; "strangulo"; "quasi"; "pseudo"; "procto";
    "copro"; "hydro"; "gastro"; "thermo"; "mystico"; "arcano"; "disastro"; "vagino"; "dino"; "nympho"; "pharma"; |]
let ists  = [| "plurali"; "femini"; "activi"; "sociali"; "marxi"; "lenini"; "stalini"; "fasci"; "sadi"; "stirneri"; "masochi"; "imperiali"; "arcani"; "syndicali"; "masturbati"; "pedantici"; "posadi"; "hoxhai"; "maoi"; "papi"; "catholici"; "protestanti"; "coloniali"; "francoi"; "materiali"; "immateriali"; "sexuali"; "stallmani"; "minarchi"; "totalitariani"; "authoritariani"; "revisioni"; "legali"; "supremaci"; "masculi"; "primitivi"; |]

let range min max = (Random.int (max-min)) + min
let chance n = range 0 n = 0
let pick (r: 'a array) : 'a = r.(range 0 (Array.length r));;

let rec accumulate fn times = fn () ^ if times = 0 then "" else " "^(accumulate fn (times-1))
let makeist () = (if chance 2 then (pick prefixes)^"-" else "") ^ (pick ists)^(pick [|"st"; "te"|])
let ideology () = (if chance 3 then (if chance 4 then (pick prefixes) else "") ^ (pick adjs)^" "  else "" ) ^ (accumulate makeist (range 0 2)) ^ " " ^ (if chance 2 then ((if chance 3 then pick prefixes else "") ^"anarchism") else (pick [|"anarcho-";"arachno-"|])^(pick ists)^"sm")
let () = Random.self_init (); print_string (ideology ())
	
