Skip to content

Instantly share code, notes, and snippets.

type Variable = Strings of float | Number of float * float * float
type Probability = Map<string , Map<string,Variable> * float>
let inline pairAdd (a,b) (c,d) = a + c , b + d
let inline div (a,b) = if b = 0. then a else a / b
let strOfVar = function Strings(n) -> n | _ -> 0.
open System
open Prelude
open System.Text.RegularExpressions
open System.IO
open System.Windows
let sw = Diagnostics.Stopwatch()
/////////////////////////////////////////////////////////////
let countsymbols (s : string) =
// Learn more about F# at http://fsharp.net
// See the 'F# Tutorial' project for more help.
open System.IO
open SevenZip
open System
SevenZipCompressor.SetLibraryPath(@"path/to/7z.dll")
let dir = @"files/path/..."