diff --git a/f.go b/f.go index c532483..c8e946f 100644 --- a/f.go +++ b/f.go @@ -11,7 +11,23 @@ import ( ) const NORMAL90CONFIDENCE = 1.6448536269514727 -const general_err_msg = "Valid inputs: 2 || * 2 || / 2 || 2 20 || * 2 20 || / 2 20 || clean || =: var || op var || clean || help || debug || exit" +const GENERAL_ERR_MSG = "Valid inputs: 2 || * 2 || / 2 || 2 20 || * 2 20 || / 2 20 || clean || =: var || op var || clean || help || debug || exit" + +// Distribution interface +// https://go.dev/tour/methods/9 + +type Distribution interface { + Samples() []float64 +} + +type Lognormal struct { + low float64 + high float64 +} + +func (l Lognormal) Samples() []float64 { + +} // Actually, I should look up how do do a) enums in go, b) union types type Lognormal struct { @@ -27,7 +43,7 @@ type Dist struct { // Parse line into Distribution func parseLineErr(err_msg string) (string, Dist, error) { - fmt.Println(general_err_msg) + fmt.Println(GENERAL_ERR_MSG) fmt.Println(err_msg) return "", Dist{}, errors.New(err_msg) } @@ -179,7 +195,7 @@ EventForLoop: case words[0] == "exit" || words[0] == "e": break EventForLoop case words[0] == "help" || words[0] == "h": - fmt.Println(general_err_msg) + fmt.Println(GENERAL_ERR_MSG) continue EventForLoop case words[0] == "debug" || words[0] == "d": fmt.Printf("Old dist: %v\n", old_dist) diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..9232354 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.nunosempere.com/NunoSempere/fermi.git + +go 1.22.1